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

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