RAS_CameraData.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * ***** BEGIN GPL LICENSE BLOCK *****
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version 2
  7. * of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software Foundation,
  16. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. *
  18. * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
  19. * All rights reserved.
  20. *
  21. * The Original Code is: all of this file.
  22. *
  23. * Contributor(s): none yet.
  24. *
  25. * ***** END GPL LICENSE BLOCK *****
  26. */
  27. /** \file RAS_CameraData.h
  28. * \ingroup bgerast
  29. */
  30. #ifndef __RAS_CAMERADATA_H__
  31. #define __RAS_CAMERADATA_H__
  32. struct RAS_CameraData
  33. {
  34. float m_lens;
  35. float m_scale;
  36. float m_sensor_x;
  37. float m_sensor_y;
  38. short m_sensor_fit;
  39. float m_shift_x;
  40. float m_shift_y;
  41. float m_clipstart;
  42. float m_clipend;
  43. bool m_perspective;
  44. bool m_viewport;
  45. int m_viewportleft;
  46. int m_viewportbottom;
  47. int m_viewportright;
  48. int m_viewporttop;
  49. float m_focallength;
  50. RAS_CameraData(float lens = 35.0f, float scale = 6.0f, float sensor_x = 32.0f, float sensor_y = 18.0f, short sensor_fit = 0,
  51. float shift_x = 0.0f, float shift_y = 0.0f,
  52. float clipstart = 0.1f, float clipend = 5000.0f, bool perspective = true,
  53. float focallength = 3.0f, bool viewport = false, int viewportleft = 0, int viewportbottom = 0,
  54. int viewportright = 0, int viewporttop = 0) :
  55. m_lens(lens),
  56. m_scale(scale),
  57. m_sensor_x(sensor_x),
  58. m_sensor_y(sensor_y),
  59. m_sensor_fit(sensor_fit),
  60. m_shift_x(shift_x),
  61. m_shift_y(shift_y),
  62. m_clipstart(clipstart),
  63. m_clipend(clipend),
  64. m_perspective(perspective),
  65. m_viewport(viewport),
  66. m_viewportleft(viewportleft),
  67. m_viewportbottom(viewportbottom),
  68. m_viewportright(viewportright),
  69. m_viewporttop(viewporttop),
  70. m_focallength(focallength)
  71. {
  72. }
  73. };
  74. #endif /* __RAS_CAMERADATA_H__ */