OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_OUTPUT_BSP_CONTROLLER_H_ | |
6 #define CC_OUTPUT_BSP_CONTROLLER_H_ | |
7 | |
8 #include "cc/output/bsp_compare_result.h" | |
9 #include "cc/quads/draw_polygon.h" | |
10 | |
11 namespace cc { | |
12 | |
13 // Specialization of the BSP Controller abstract class that deals specifically | |
enne (OOO)
2014/07/28 21:38:19
This comment I think should just be removed.
| |
14 // with DrawPolygons | |
15 class BspController { | |
16 public: | |
17 BspController(); | |
18 | |
19 // Returns whether or not nodeA is on one or the other side of nodeB, | |
20 // coplanar, or whether it crosses nodeB's plane and needs to be split | |
21 static BspCompareResult GetNodePositionRelative(const DrawPolygon& node_a, | |
22 const DrawPolygon& node_b); | |
23 // Returns whether or not our viewer is in front of or behind the plane | |
24 // defined by this polygon/node | |
25 static BspCompareResult GetCameraPositionRelative(const DrawPolygon& node); | |
26 static bool SplitPolygon(scoped_ptr<DrawPolygon> polygon, | |
27 const DrawPolygon& splitter, | |
28 scoped_ptr<DrawPolygon>* front, | |
29 scoped_ptr<DrawPolygon>* back); | |
30 }; | |
31 | |
32 } // namespace cc | |
33 | |
34 #endif // CC_OUTPUT_BSP_CONTROLLER_H_ | |
OLD | NEW |