public bool IsCulling(Vector2 offset, float scale, CullingRect rect) { // 設定してないときはカリングする if (!m_is_1st) { return(true); } Vector2 pos2 = offsetscale(m_max, offset, scale); pos2 += m_offset_rb; if (pos2.X < rect.left_top.X) { return(true); } if (pos2.Y < rect.left_top.Y) { return(true); } Vector2 pos = offsetscale(m_min + m_offset_lt, offset, scale); pos += m_offset_lt; if (pos.X >= rect.right_bottom.X) { return(true); } if (pos.Y >= rect.right_bottom.Y) { return(true); } // カリングしない return(false); }
/*------------------------------------------------------------------------- * カリングチェック * ---------------------------------------------------------------------------*/ public bool IsCulling(CullingRect rect) { return(IsCulling(new Vector2(0, 0), 1, rect)); }