DrawScene.h

#pragma once


namespace Core
{
    /// 背景の描画
    public ref class DrawScene
    {
    // Construction --------------------------------------------------------
    public:
        DrawScene( Microsoft::DirectX::Direct3D::Device^ device );

        ~DrawScene() { DrawScene::!DrawScene(); }
        !DrawScene();


    // Operation -----------------------------------------------------------
    public:
        void Render();

    private:
        void CreateAxisOfCoordinates();
        void CreateFloor();

        void RenderLine( Microsoft::DirectX::Direct3D::VertexBuffer^ data, int primitiveCount );


    // Event Handler -------------------------------------------------------
    private:
        void SetAxisOfCoordinates( System::Object^ sender, System::EventArgs^ e );
        void SetFloor( System::Object^ sender, System::EventArgs^ e );


    // Attribute ===========================================================
    private:
        Microsoft::DirectX::Direct3D::Device^ m_device;                  ///< デバイス

        Microsoft::DirectX::Direct3D::VertexBuffer^ m_axisOfCoordinates; ///< 座標軸
        Microsoft::DirectX::Direct3D::VertexBuffer^ m_floor;             ///< 床

    // static
        literal float WidthOfFloor = 2.0f;          ///< 床の幅[m]
        literal float DistanceOfFloorMesh = 0.1f;   ///< 床メッシュの間隔[m]

    };
}