// +-------------------------------- DISCLAIMER ---------------------------------+
// |                                                                             |
// | This program is provided to you free of charge "as such".                   |
// | You should not assume that this program is error-free or suitable for any   |
// | purpose whatsoever.                                                         |
// |                                                                             |
// | EURESYS does not give any representation, warranty or undertaking that this |
// | program is free of any defect or error or suitable for any purpose. EURESYS |
// | shall not be liable, in contract, in torts or otherwise, for any damages,   |
// | loss, costs, expenses or other claims for compensation, including those     |
// | asserted by third parties, arising out of or in connection with the use of  |
// | this program.                                                               |
// +-----------------------------------------------------------------------------+

#pragma once
#include "C2DView.h"
#include "C3DView.h"

class GrabberInterface;

// Easy3DGrabDlg dialog
class Easy3DGrabDlg : public CDialogEx
{
  // Construction
public:
  Easy3DGrabDlg(CWnd* pParent = nullptr);	// standard constructor
  ~Easy3DGrabDlg();

// Dialog Data
#ifdef AFX_DESIGN_TIME
  enum { IDD = IDD_EASY3DGRAB_DIALOG };
#endif

protected:
  virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
  HICON m_hIcon;
  CStatusBar m_bar;
  CComboBox m_object_info_ctrl;

  // views
  C2DView depthmap_view;
  C3DView pointcloud_view;
  C2DView zmap_view;

  // Generated message map functions
  virtual BOOL OnInitDialog();
  virtual void OnCancel();
  afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  afx_msg void OnPaint();
  afx_msg HCURSOR OnQueryDragIcon();
  afx_msg void OnBnClickedGrab();
  afx_msg void OnClickedPropertiesButton();
  afx_msg void OnClickedSaveDepthmap();
  afx_msg void OnClickedSavePointCloud();
  afx_msg void OnClickedSaveZMap();
  afx_msg void OnClickedExtract();
  afx_msg void OnClickedGroundLevel();
  afx_msg void OnClickedObjectInfo();

  DECLARE_MESSAGE_MAP()

  // frame grabber & 3D data
  GrabberInterface* grabber;
  Easy3D::EDepthMap* depth_map;
  Easy3D::EPointCloud point_cloud;
  Easy3D::EZMap* zmap;

  // scene leveling option
  bool ground_leveled;
  Easy3D::E3DPlane ground_plane;
};
