abc_camera.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. * Contributor(s): Esteban Tovagliari, Cedric Paille, Kevin Dietrich
  19. *
  20. * ***** END GPL LICENSE BLOCK *****
  21. */
  22. #ifndef __ABC_CAMERA_H__
  23. #define __ABC_CAMERA_H__
  24. #include "abc_object.h"
  25. /* ************************************************************************** */
  26. class AbcCameraWriter : public AbcObjectWriter {
  27. Alembic::AbcGeom::OCameraSchema m_camera_schema;
  28. Alembic::AbcGeom::CameraSample m_camera_sample;
  29. Alembic::AbcGeom::OCompoundProperty m_custom_data_container;
  30. Alembic::AbcGeom::OFloatProperty m_stereo_distance;
  31. Alembic::AbcGeom::OFloatProperty m_eye_separation;
  32. public:
  33. AbcCameraWriter(Scene *scene,
  34. Object *ob,
  35. AbcTransformWriter *parent,
  36. uint32_t time_sampling,
  37. ExportSettings &settings);
  38. private:
  39. virtual void do_write();
  40. };
  41. /* ************************************************************************** */
  42. class AbcCameraReader : public AbcObjectReader {
  43. Alembic::AbcGeom::ICameraSchema m_schema;
  44. public:
  45. AbcCameraReader(const Alembic::Abc::IObject &object, ImportSettings &settings);
  46. bool valid() const;
  47. bool accepts_object_type(const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header,
  48. const Object *const ob,
  49. const char **err_str) const;
  50. void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel);
  51. };
  52. #endif /* __ABC_CAMERA_H__ */