//#####################################################################
// Copyright 2002-2005, Robert Bridson, Eilene Hao, Geoffrey Irving, Joseph Teran.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Class QT_AXES
//##################################################################### 
#ifndef __QT_AXES__
#define __QT_AXES__

#include <Core/Math_Tools/RANGE.h>
#include <Core/Matrices/FRAME.h>
#include "QT_COMPONENT.h"
namespace PhysBAM{

struct AXES_OPTIONS;

template<int d>
class QT_AXES:public QT_COMPONENT
{
public:
    typedef AXES_OPTIONS OPT;
    typedef float T;typedef VECTOR<T,d> TV;
    typedef VECTOR<int,d> IV;
    using typename QT_COMPONENT::COLOR;
private:
    OPT opt,raw_opt[4];
public:

    TV X;
    FRAME<TV> frame;

    QT_AXES(QT_WORLD& world,const std::string& name);
    ~QT_AXES();

//#####################################################################
    void Read() override;
    void Invalidate(bool invalidate_common) override;
    RANGE<FV> Bounding_Box() override;
    void Render(QT_RENDER_UTILS& ru) override;
    void Clear_Selection() override;
    void Set_Selection(ARRAY_VIEW<int> selection) override;
    FV Selection_Point() override;
    void Make_Dialog(QT_WINDOW& window) override;
    void Read_Option(std::istream& in,int level) override;
    void Set_Draw(bool draw) override;
    bool Draw() const override;
    void Save_Settings(std::ostream& out) override;
    void Clear_Settings() override;
    void Scale(const T scale);
//#####################################################################
};
}
#endif
