// +-------------------------------- 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

// C3DView control
class C3DView : public CStatic
{
public:
  C3DView();
  ~C3DView();

  void SetPointCloud(const Easy3D::EPointCloud& pc);
  void SetObjectList(const std::vector<Easy3D::E3DObject>& ObjList);
  void UpdateObjectInformation(int selection);

protected:
  DECLARE_MESSAGE_MAP()

  afx_msg void OnPaint();
  BOOL PreTranslateMessage(MSG* pMsg);

  void UpdateObjectInformation();
  void UpdateObjectSelected(int diff); // +1 for next object, -1 for previous object

  // The 3D viewer
  Easy3D::E3DViewer* m_viewer;
  bool m_first_time;
  CRect viewerRect_;
  bool m_show_object_volume, m_show_object_dimensions, m_show_object_center;
  EFloatRange m_cloudXRange, m_cloudYRange, m_cloudZRange;
  EC24 m_color_3Dobject_info;

  // Optional object list
  std::vector<Easy3D::E3DObject> m_ObjList;

  // Object information display
  int m_object_info_sel;
  int m_object_info_label_id;
  int m_object_selected;
};
