Exemple #1
0
        static public void Draw(D3dBB2d bb, d3d_device device, float z, Vector2 offset, float scale, int color)
        {
            Vector2 pos  = offsetscale(bb.Min, offset, scale);
            Vector2 pos2 = offsetscale(bb.Max, offset, scale);

            pos  += bb.OffsetLT;
            pos2 += bb.OffsetRB;
            Vector2 size = pos2 - pos;

            device.DrawLineRect(new Vector3(pos.X, pos.Y, z), size, color);
        }
Exemple #2
0
        /*-------------------------------------------------------------------------
         * 更新した結果を新しい D3dBB2d で返す
         * ---------------------------------------------------------------------------*/
        public D3dBB2d IfUpdate(Vector2 pos)
        {
            D3dBB2d bb = new D3dBB2d();

            if (m_is_1st)
            {
                // 初期化されていれば最大と最小を設定する
                bb.Update(Min);
                bb.Update(Max);
            }
            bb.Update(pos);                     // 更新してみる
            bb.OffsetLT = m_offset_lt;
            bb.OffsetRB = m_offset_rb;
            return(bb);
        }
Exemple #3
0
 static public void Draw(D3dBB2d bb, d3d_device device, float z, int color)
 {
     Draw(bb, device, z, new Vector2(0, 0), 1, color);
 }
Exemple #4
0
 /*-------------------------------------------------------------------------
  * 描画
  * (offset + pos) * scale
  * ---------------------------------------------------------------------------*/
 public void Draw(d3d_device device, float z, Vector2 offset, float scale, int color)
 {
     D3dBB2d.Draw(this, device, z, offset, scale, color);
 }
Exemple #5
0
 /*-------------------------------------------------------------------------
  * 描画
  * ---------------------------------------------------------------------------*/
 public void Draw(d3d_device device, float z, int color)
 {
     D3dBB2d.Draw(this, device, z, color);
 }