You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

abstractrenderdevice.cpp 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #include "abstractrenderdevice.h"
  2. #include <QImage>
  3. AbstractRenderDevice::AbstractRenderDevice(QObject *parent) :
  4. QObject(parent)
  5. {
  6. }
  7. AbstractRenderDevice::~AbstractRenderDevice()
  8. {
  9. }
  10. QColor AbstractRenderDevice::getCurrentColor() const
  11. {
  12. return _currentColor;
  13. }
  14. Vector3D AbstractRenderDevice::getLookEye() const
  15. {
  16. return _lookEye;
  17. }
  18. Vector3D AbstractRenderDevice::getLookCenter() const
  19. {
  20. return _lookCenter;
  21. }
  22. Vector3D AbstractRenderDevice::getLookUp() const
  23. {
  24. return _lookUp;
  25. }
  26. void AbstractRenderDevice::setCurrentColor(const QColor &color)
  27. {
  28. _currentColor = color;
  29. }
  30. void AbstractRenderDevice::lookAt(const Vector3D &eye, const Vector3D &center, const Vector3D &up)
  31. {
  32. _lookEye = eye;
  33. _lookCenter = center;
  34. _lookUp = up;
  35. }
  36. void AbstractRenderDevice::loadTextureFromFile(const QVariant &id, const QString &filename)
  37. {
  38. QImage img;
  39. if (img.load(filename)) {
  40. loadTexture(id, img);
  41. }
  42. }
  43. QColor AbstractRenderDevice::getClearColor() const
  44. {
  45. return _clearColor;
  46. }
  47. void AbstractRenderDevice::setClearColor(const QColor &clearColor)
  48. {
  49. _clearColor = clearColor;
  50. }