OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkRTree_DEFINED | 9 #ifndef SkRTree_DEFINED |
10 #define SkRTree_DEFINED | 10 #define SkRTree_DEFINED |
(...skipping 13 matching lines...) Expand all Loading... |
24 * which groups rects by position on the Hilbert curve, is probably worth a look
). There also | 24 * which groups rects by position on the Hilbert curve, is probably worth a look
). There also |
25 * exist top-down bulk load variants (VAMSplit, TopDownGreedy, etc). | 25 * exist top-down bulk load variants (VAMSplit, TopDownGreedy, etc). |
26 * | 26 * |
27 * For more details see: | 27 * For more details see: |
28 * | 28 * |
29 * Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). "The R*-tree
: | 29 * Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). "The R*-tree
: |
30 * an efficient and robust access method for points and rectangles" | 30 * an efficient and robust access method for points and rectangles" |
31 */ | 31 */ |
32 class SkRTree : public SkBBoxHierarchy { | 32 class SkRTree : public SkBBoxHierarchy { |
33 public: | 33 public: |
34 SK_DECLARE_INST_COUNT(SkRTree) | 34 |
35 | 35 |
36 /** | 36 /** |
37 * If you have some prior information about the distribution of bounds you'r
e expecting, you | 37 * If you have some prior information about the distribution of bounds you'r
e expecting, you |
38 * can provide an optional aspect ratio parameter. This allows the bulk-load
algorithm to | 38 * can provide an optional aspect ratio parameter. This allows the bulk-load
algorithm to |
39 * create better proportioned tiles of rectangles. | 39 * create better proportioned tiles of rectangles. |
40 */ | 40 */ |
41 explicit SkRTree(SkScalar aspectRatio = 1); | 41 explicit SkRTree(SkScalar aspectRatio = 1); |
42 virtual ~SkRTree() {} | 42 virtual ~SkRTree() {} |
43 | 43 |
44 void insert(const SkRect[], int N) override; | 44 void insert(const SkRect[], int N) override; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // This is the count of data elements (rather than total nodes in the tree) | 89 // This is the count of data elements (rather than total nodes in the tree) |
90 int fCount; | 90 int fCount; |
91 SkScalar fAspectRatio; | 91 SkScalar fAspectRatio; |
92 Branch fRoot; | 92 Branch fRoot; |
93 SkTDArray<Node> fNodes; | 93 SkTDArray<Node> fNodes; |
94 | 94 |
95 typedef SkBBoxHierarchy INHERITED; | 95 typedef SkBBoxHierarchy INHERITED; |
96 }; | 96 }; |
97 | 97 |
98 #endif | 98 #endif |
OLD | NEW |