[0032]The present invention will be further described below in conjunction with the accompanying drawings and specific examples to better understand the invention and can be implemented. It should be understood that the specific embodiments described herein are merely intended to illustrate the invention and are not intended to limit the invention.
[0033]The present invention provides a geometric graphic cone implementation method, system and computer readable storage medium, system and computer readable storage medium, and specific schemes for applications to smart cities.
[0034]Such asfigure 1 As shown, the present invention provides a geometric graphic cone implementation method for an OCC tree applied to a smart city, characterized in that the method comprises the following steps:
[0035]Step S1: Collect the shutter and the shield.
[0036]The shielding body and the shutter are collected, and the weight Weight of the mask is calculated.
[0037]The formula for calculating weight is Weight = N * Distance (OrigInpos, Worldpos), where n represents object weight, originpos is the origin coordinate, worldpos is the world coordinate of the object.
[0038]Step S2: Sort the shutter according to the weight.
[0039]According to the weight Weight, the shield is sorted, and the shielding body that is truly movable is screened, for example, a transparent process can be performed; wherein the sorting is sorted in order of high to low in the order of the shielding body, ie priority. The shield of the weight is high, and the weight of the weight is blocked by a high weight shield.
[0040]Step S3: Calculate the visibility of the shield and the shutter.
[0041]The shutter and the obstruction are mapped to the screen space, respectively, and generate a set of screen triangles, wherein the shielding body maps the triangles of the envelope, and for each shield only the maximum value on the screen and The triangle formed by the minimum value, and the post-occlusion detection can be extended as a rectangle. Think although some precision is sacrificed, the increase in efficiency is very large; here is a point in which a width is 64 is divided into a write-screen triangle.
[0042]Step S4: The visible information is stored in the sequencing the shield and the shutter to store the visibility information using the data structure of 64-bit UNSigned long long.
[0043]The screen triangle generated by the shutter and the shield body is sorted according to the depth of the screen, and the front, after the screen is long, where the shutter is in the triangular depth of the three points. The triangular depth of the shutter is taken with the nearest depth of the three points, so that the correctness of the occlusion can be maximized. Then the sorted triangle is traversed, the traversal process comprising the steps of:
[0044]Step S41, for the shutter, row scanning each rectangle, the number of bindings in each rectangle is integer, and the boundary detection is performed, and all the triangular pixels in this rectangle are selected. In this rectangular range of triangular pixels, if there is a triangular pixel of the shutter, the corresponding position of the pixel corresponds to the corresponding position of 1, and the other bit is set to zero.
[0045]Step S42, for the blocked body, traversing each triangle, then extension the triangle is quadrilateral, scanning in the rectangle, and the corresponding pixel corresponds to the unsigned long long integer in the rectangle. It is 1, then this object is blocked, that is, the object is visible.
[0046]Step S43, finally put the detection result into an eight forte tree, accordingly, rendering.
[0047]Such asfigure 2As shown, according to an embodiment of the present invention, the present invention also discloses a geometric graphic cone implementation device for use in an OCC tree of smart cities, including:
[0048]Collection module is used to collect the shutter and the obstruction;
[0049]The sort module is used to sort the shutter according to weight;
[0050]The module is calculated to calculate the visibility of the shield and the obstructed body;
[0051]The memory module is used to traverse the sorted shield and the shutter to store visibility information using the data structure of 64-bit UNSigned longlong.
[0052]According to an embodiment of the present invention, the present invention also discloses a computer readable storage medium that stores a computer program on the computer readable storage medium, which is implemented by the processor to implement the application in smart city. The step of implementing the geometric view of the OCC tree.
[0053]A geometric view of the geometric view of the OCC tree applied to smart cities, the device and computer readable storage medium, can expand the scanning range, by mapping the shutter and the obstruction to the screen space, generate A set of screen triangles, by sorting the screen triangle, quickly calculating the objects that need to be removed quickly and increase the efficiency of the calculation.
[0054]Each functional unit in various embodiments of the present invention can be integrated into one processing unit, or may be generated separately in each unit, or two or more units can be integrated into one unit. The above-described integrated units can be implemented in the form of hardware, or may be implemented in the form of a software functional unit.
[0055]The integrated unit can be stored in a computer readable storage medium if implemented in the form of a software functional unit and is sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention essentially ors a portion of the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium. A number of instructions are included to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or some of the steps described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, RAD-ONLYMEMORY), random access memory (RAM, RANDOM Access Memory), Reram, MRAM, PCM, NAND Flash, Nor Flash, Memristor, Various media such as disk or disc can store the media code.
[0056]The above embodiments are merely illustrative of the preferred embodiments of the present invention, and the scope of the invention is not limited thereto. Those skilled in the art will be within the scope of the invention as follows, in the scope of the invention. The scope of protection of the present invention is subject to the claims.