CN102074004B - Method and device for determining type of barrier of spatial entity - Google Patents

Method and device for determining type of barrier of spatial entity Download PDF

Info

Publication number
CN102074004B
CN102074004B CN 201010617403 CN201010617403A CN102074004B CN 102074004 B CN102074004 B CN 102074004B CN 201010617403 CN201010617403 CN 201010617403 CN 201010617403 A CN201010617403 A CN 201010617403A CN 102074004 B CN102074004 B CN 102074004B
Authority
CN
China
Prior art keywords
spatial
view
entity
view window
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 201010617403
Other languages
Chinese (zh)
Other versions
CN102074004A (en
Inventor
董福田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Superengine Graphics Software Technology Development Co ltd
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201010144131A external-priority patent/CN101814094A/en
Application filed by Individual filed Critical Individual
Priority to CN 201010617403 priority Critical patent/CN102074004B/en
Publication of CN102074004A publication Critical patent/CN102074004A/en
Application granted granted Critical
Publication of CN102074004B publication Critical patent/CN102074004B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/40Hidden part removal

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for determining the type of a barrier of a spatial entity, and the method comprises the following steps: selecting the current spatial entity to be analyzed from the spatial entities which are sequenced according to preset sequencing rules and need to be analyzed; transforming an original coordinate of original spatial data of the current spatial entity to be analyzed, and getting a view coordinate of a view window; and analyzing the type of the barrier of the spatial entity in the view window. With the adoption of the method which is closed by the embodiment of the invention and used for determining the type of the barrier of the spatial entity, the barrier situation of the spatial entity in the view window during display can be determined according to preset view control parameters, thereby simplifying the computational process of barrier computation among the spatial entities, reducing the computational work, improving the determinationefficiency of the type of the barrier and solving the problem of complex and difficult real-time judgment process of the type of the barrier for the massive spatial entities.

Description

空间实体遮挡类型的判定方法及装置Method and device for judging space entity occlusion type

技术领域technical field

本发明涉及空间信息技术、计算机图形学和计算机操作系统领域,尤其涉及空间实体遮挡类型的判定方法及装置。The invention relates to the fields of spatial information technology, computer graphics and computer operating systems, and in particular to a method and device for judging the occlusion type of a spatial entity.

背景技术Background technique

随着空间信息技术的快速发展,获取的高分辨率、高精度的空间数据呈爆炸式增长,但随之产生了一系列的问题需要解决,特别突出的是高精细地图的海量空间数据的实时快速传输和显示的问题。With the rapid development of spatial information technology, the high-resolution and high-precision spatial data acquired is growing explosively, but a series of problems need to be solved, especially the real-time Quick transfer and display issues.

空间实体主要表示方式是通过电子地图来展示的,电子地图是将空间实体通过一定的硬件和软件在电子屏幕上显示的可视地图,是空间实体在电子屏幕的视图窗口上栅格化显示的过程。给空间实体赋予的用于在电子地图上显示的属性和图示化信息,称之为要素。点实体对应点要素,线实体对应线要素,面实体对应面要素。其中空间实体的图示化信息,点要素的图示信息一般包括:点的符号类型,符号大小,符号颜色;线的图示信息包括:线状符号的类型,线状符号的宽度,线状符号的颜色;面的图示信息包括:面的填充类型(如是否透明),面符号的类型,面的填充颜色。有的空间实体本身记录空间实体的图示化信息,有的是在电子地图显示时,按照图层,给同一类空间实体设置统一的图示信息。The main representation of spatial entities is through electronic maps. Electronic maps are visual maps that display spatial entities on electronic screens through certain hardware and software. Spatial entities are displayed in a grid on the view window of electronic screens. process. The attributes and graphical information assigned to spatial entities for display on the electronic map are called elements. Point entities correspond to point features, line entities correspond to line features, and area entities correspond to area features. Among them, the graphical information of spatial entities and the graphical information of point elements generally include: point symbol type, symbol size, and symbol color; the graphical information of lines includes: line symbol type, line symbol width, line shape The color of the symbol; the graphic information of the surface includes: the filling type of the surface (such as whether it is transparent), the type of the surface symbol, and the filling color of the surface. Some spatial entities themselves record the graphic information of the spatial entity, and some set unified graphic information for the same type of spatial entity according to the layer when the electronic map is displayed.

上述栅格化指的是将矢量图形格式表示图形的空间数据转换成栅格图像,栅格图像的每个像素值通常代表颜色值,以用于显示器显示、在纸上打印输出及生成图像文件输出等过程。The above-mentioned rasterization refers to the conversion of spatial data representing graphics in a vector graphics format into a raster image. Each pixel value of a raster image usually represents a color value for display on a monitor, printout on paper, and image file generation output process.

在对空间实体的处理过程中,有些情况下,需要对空间实体的遮挡类型进行判定,也就是,分析空间实体有没有被其他的空间实体遮挡,现有技术中需要进行判定的空间实体的数据量大,判定过程效率低,判定后的空间实体也不能保证能够在视图窗口中进行显示,判定效果也较差。In the process of processing spatial entities, in some cases, it is necessary to determine the occlusion type of the spatial entity, that is, to analyze whether the spatial entity is blocked by other spatial entities, the data of the spatial entity that needs to be determined in the prior art The quantity is large, the efficiency of the determination process is low, and the determined spatial entity cannot be guaranteed to be displayed in the view window, and the determination effect is also poor.

发明内容Contents of the invention

有鉴于此,本发明提供一种空间实体遮挡类型的判定方法及装置,以解决现有技术中对海量空间数据的遮挡类型判定过程复杂,处理效率低,判定效果差的问题,其具体方案如下:In view of this, the present invention provides a method and device for judging the occlusion type of a spatial entity to solve the problems in the prior art that the occlusion type judgment process for massive spatial data is complicated, the processing efficiency is low, and the judgment effect is poor. The specific solution is as follows :

一种空间实体遮挡类型的判定方法,包括:A method for judging the occlusion type of a spatial entity, comprising:

从按照预设排序规则进行排序的待分析空间实体中选取当前待分析空间实体;Select the current spatial entity to be analyzed from the spatial entities to be analyzed sorted according to the preset sorting rules;

依据预先设定的视图控制参数,将所述当前待分析空间实体的原始空间数据的原始坐标变换得到视图窗口的视图坐标;Transforming the original coordinates of the original spatial data of the current spatial entity to be analyzed according to the preset view control parameters to obtain the view coordinates of the view window;

分析所述空间实体在所述视图窗口中的遮挡类型;analyzing the occlusion type of the spatial entity in the view window;

判断所述空间实体的遮挡类型是否符合预设有效空间实体条件,若是,则确定所述空间实体为有效空间实体,若否,则确定所述空间实体为无效空间实体;Judging whether the occlusion type of the space entity meets the preset valid space entity condition, if so, determining that the space entity is a valid space entity, and if not, determining that the space entity is an invalid space entity;

选取所述有效空间实体;selecting the active space entity;

将所述有效空间实体传输到客户端。The live space entity is transmitted to the client.

优选的,所述视图窗口利用数据结构依据所述视图控制参数进行表示,具体为:依据所述视图控制参数用所述栅格数据结构来表示所述视图窗口的像素,所述像素为所述视图窗口平面划分成的均匀网格单元,所述像素为所述栅格数据中的基本信息存储单元,所述像素的坐标位置依据所述像素在所述视图窗口中对应的行号和列号确定,设定表示所述像素的栅格数据的初始值全部为0。Preferably, the view window is represented by a data structure according to the view control parameters, specifically: using the grid data structure to represent the pixels of the view window according to the view control parameters, and the pixels are the The view window plane is divided into uniform grid units, the pixel is the basic information storage unit in the raster data, and the coordinate position of the pixel is based on the corresponding row number and column number of the pixel in the view window OK, set the initial values of the raster data representing the pixel to all 0.

优选的,所述分析所述空间实体在所述视图窗口中的遮挡类型的过程包括:Preferably, the process of analyzing the occlusion type of the spatial entity in the view window includes:

判断所述空间实体在所述视图窗口中显示时需要绘制的像素的值是否全部为1,若全部为1,则所述遮挡类型为完全遮挡;若全部为0,则所述遮挡类型为未被遮挡;若部分为1,则所述遮挡类型为部分遮挡。Determine whether the values of the pixels that need to be drawn when the spatial entity is displayed in the view window are all 1, if all are 1, then the occlusion type is complete occlusion; if all are 0, then the occlusion type is not Occluded; if part is 1, the occlusion type is partial occlusion.

优选的,当所述空间实体的遮挡类型为未被遮挡和/或部分遮挡时,将所述空间实体在所述视图窗口上显示时需要绘制的像素中像素值为0的像素赋值为1。Preferably, when the occlusion type of the spatial entity is not occluded and/or partially occluded, a pixel with a pixel value of 0 among the pixels to be drawn when the spatial entity is displayed on the view window is assigned a value of 1.

优选的,所述预设有效空间实体的条件包括:遮挡类型为未被遮挡的空间实体或遮挡类型为未被遮挡和部分被遮挡的空间实体。Preferably, the preset conditions for valid spatial entities include: the occlusion type is an unoccluded spatial entity or the occlusion type is an unoccluded and partially occluded spatial entity.

优选的,所视图控制参数包括:视图模式和视图窗口的外包矩形参数;所述视图模式包括:二维模式和三维模式,所述视图窗口的外包矩形参数包括:视图窗口的外包矩形的宽度和视图窗口的外包矩形的高度;Preferably, the view control parameters include: a view mode and an outer rectangle parameter of the view window; the view mode includes: a two-dimensional mode and a three-dimensional mode, and the outer rectangle parameters of the view window include: the width of the outer rectangle of the view window and The height of the bounding rectangle of the view window;

当所述视图模式为二维模式时,所述视图控制参数还包括:空间实体在所述视图窗口中的中心坐标点和视图中空间实体的放大比例,或者查询空间实体的矩形范围和视图中空间实体的放大比例;When the view mode is a two-dimensional mode, the view control parameters also include: the central coordinate point of the spatial entity in the view window and the magnification ratio of the spatial entity in the view, or query the rectangular range and view of the spatial entity The magnification ratio of the spatial entity;

当所述视图模式为三维模式时,所述视图控制参数还包括:视点参数和投影参数,所述视点参数包括视点在世界坐标系中的位置、视点所观察的目标位置和虚拟照相机向上的向量;所述投影参数包括:正交投影和透视投影。When the view mode is a three-dimensional mode, the view control parameters also include: viewpoint parameters and projection parameters, the viewpoint parameters include the position of the viewpoint in the world coordinate system, the target position observed by the viewpoint and the upward vector of the virtual camera ; The projection parameters include: orthogonal projection and perspective projection.

优选的,当所述视图控制参数中的视图模式为二维模式时,所述预设排序规则为按照空间实体绘制顺序的逆序对空间实体进行排序。Preferably, when the view mode in the view control parameter is a two-dimensional mode, the preset sorting rule is to sort the spatial entities in the reverse order of the drawing order of the spatial entities.

优选的,当所述视图控制参数中的视图模式为三维模式时,所述预设排序规则为按照空间实体离视点由近及远的顺序对空间实体进行排序。Preferably, when the view mode in the view control parameter is a three-dimensional mode, the preset sorting rule is to sort the spatial entities in the order of the spatial entities from the viewpoint to the farthest.

一种空间实体遮挡类型的判定装置,包括:A device for judging the occlusion type of a spatial entity, comprising:

选取单元,用于从按照预设排序规则进行排序的待分析空间实体中选取当前待分析空间实体;The selection unit is used to select the current spatial entity to be analyzed from the spatial entities to be analyzed sorted according to the preset sorting rules;

坐标转换单元,依据预先设定的视图控制参数,将所述当前待分析空间实体的原始空间数据的原始坐标变换得到视图窗口的视图坐标;The coordinate conversion unit transforms the original coordinates of the original spatial data of the current spatial entity to be analyzed according to the preset view control parameters to obtain the view coordinates of the view window;

遮挡类型分析单元,用于分析所述空间实体在所述视图窗口中的遮挡类型;an occlusion type analysis unit, configured to analyze the occlusion type of the spatial entity in the view window;

判断单元,用于判断所述空间实体的遮挡类型是否符合预设有效空间实体条件,若是,则确定所述空间实体为有效空间实体,若否,则确定所述空间实体为无效空间实体;A judging unit, configured to judge whether the occlusion type of the space entity meets the preset valid space entity condition, if so, determine that the space entity is a valid space entity, and if not, determine that the space entity is an invalid space entity;

选取单元,用于选取所述有效空间实体,并将所述有效空间实体传输到客户端。The selection unit is configured to select the effective space entity and transmit the effective space entity to the client.

从上述的技术方案可以看出,本发明实施例公开的空间实体遮挡类型的判定方法,根据预先设定的视图控制参数将空间实体的原始空间数据的原始坐标变换得到视图窗口中的视图坐标,通过分析所述视图坐标判定所述空间实体显示时的遮挡情况,简化了现有技术中对空间实体之间进行遮挡计算的计算过程,减小了计算量,提高了对遮挡类型的判定效率,解决了海量空间实体遮挡类型的实时判断过程复杂困难的问题。It can be seen from the above technical solutions that the method for judging the occlusion type of the spatial entity disclosed in the embodiment of the present invention converts the original coordinates of the original spatial data of the spatial entity according to the preset view control parameters to obtain the view coordinates in the view window, By analyzing the view coordinates to determine the occlusion situation when the spatial entity is displayed, the calculation process of occlusion calculation between spatial entities in the prior art is simplified, the calculation amount is reduced, and the determination efficiency of the occlusion type is improved. It solves the problem of complex and difficult real-time judgment process of the occlusion type of massive spatial entities.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例公开的空间实体遮挡类型的判定方法的流程图;FIG. 1 is a flow chart of a method for judging a spatial entity occlusion type disclosed in an embodiment of the present invention;

图2为本发明实施例公开的有效空间实体的判定方法的流程图;FIG. 2 is a flowchart of a method for determining an effective space entity disclosed in an embodiment of the present invention;

图3为本发明实施例公开的空间实体遮挡类型的判定装置的结构示意图。Fig. 3 is a schematic structural diagram of an apparatus for determining the type of occlusion of a spatial entity disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明以视图显示的角度来研究空间数据,从视图的角度,在视图窗口的分辨率确定的情况下,无论多海量、多精细的空间数据,用于视图窗口显示所需要的最大有效空间数据是恒定的,就是用于填充完视图窗口的全部像素所需的空间数据,因为视图窗口能显示的像素总数是有限的,无论空间数据的量有多大,我们能够看到的像素是确定的,先绘制的空间实体如果被后绘制的空间实体压盖,则相当于后绘制的空间实体遮挡了先绘制的空间实体,如果是完全遮挡,从视图显示的角度来看被完全遮挡的空间实体是不需要读取、传输或者在视图窗口上绘制的。The present invention studies spatial data from the perspective of view display. From the perspective of view, when the resolution of the view window is determined, no matter how massive and fine the spatial data is, the maximum effective spatial data required for view window display It is constant, that is, the spatial data required to fill all the pixels of the view window, because the total number of pixels that the view window can display is limited, no matter how large the amount of spatial data is, the pixels we can see are determined, If the spatial entity drawn first is covered by the spatial entity drawn later, it means that the spatial entity drawn later blocks the spatial entity drawn earlier. If it is completely occluded, the spatial entity that is completely occluded from the perspective of view display is Nothing that needs to be read, transferred, or drawn on the view window.

具体来说,空间实体的显示过程一般是:首先通过空间数据索引将符合给定空间条件的空间实体取出来经过传输介质传给空间实体使用者即客户端,然后对空间实体的空间数据进行一系列的几何变换和处理之后,变换为二维图像上的坐标点;根据显示参数,空间实体最终通过绘图算法栅格化成图像像素,绘制成一幅二维栅格图像,在屏幕上显示或输出,如计算机屏幕显示、在纸上打印输出及生成图像文件输出等。其中空间实体的绘制,最终被绘图算法归结为对一个个像素的操作,本发明就是在基于上述空间数据显示过程的基础上,依据预先设定的视图控制参数,将空间实体的原始空间数据的原始坐标变换到利用数据结构依据视图控制参数表示的视图窗口的视图坐标,通过分析和处理空间实体在所述视图窗口上显示时需要绘制的像素来分析空间实体在实际进行显示的视图窗口上的显示情况,进而分析空间实体之间的遮挡情况,以便于后续处理过程可以依据分析的结果而有针对性的选取或传输空间实体,简化了现有技术中遮挡类型计算的过程及计算量,提高了判定的效率及准确性。为了方便描述,本申请文件中将需要处理的空间实体的空间数据称之为原始空间数据,需要处理的空间数据的坐标称之为原始空间数据的原始坐标,需要处理的空间数据的坐标点称之为原始空间数据的原始坐标点,或直接称之为原始坐标点。其具体的实施方式如下所述:Specifically, the display process of a spatial entity is generally as follows: firstly, the spatial entity that meets the given spatial conditions is taken out through the spatial data index and transmitted to the user of the spatial entity through the transmission medium, that is, the client, and then the spatial data of the spatial entity is processed. After a series of geometric transformations and processing, it is transformed into coordinate points on the two-dimensional image; according to the display parameters, the spatial entity is finally rasterized into image pixels through a drawing algorithm, drawn into a two-dimensional raster image, and displayed or output on the screen. Such as computer screen display, printing output on paper and generating image file output, etc. Among them, the drawing of the spatial entity is finally attributed to the operation of each pixel by the drawing algorithm. The present invention is based on the above-mentioned spatial data display process, and according to the preset view control parameters, the original spatial data of the spatial entity is Transform the original coordinates to the view coordinates of the view window represented by the view control parameters using the data structure, and analyze the position of the spatial entity on the view window that is actually displayed by analyzing and processing the pixels that need to be drawn when the spatial entity is displayed on the view window Display the situation, and then analyze the occlusion situation between the spatial entities, so that the subsequent processing process can select or transmit the spatial entities in a targeted manner according to the analysis results, simplifying the process and calculation amount of occlusion type calculation in the prior art, and improving efficiency and accuracy of judgment. For the convenience of description, in this application document, the spatial data of the spatial entity to be processed is called the original spatial data, the coordinates of the spatial data to be processed are called the original coordinates of the original spatial data, and the coordinate points of the spatial data to be processed are called It is the original coordinate point of the original spatial data, or directly called the original coordinate point. Its specific implementation is as follows:

本发明实施例公开的一种空间实体遮挡类型的判定方法的流程如图1所示,包括:The flow of a method for determining the occlusion type of a spatial entity disclosed in an embodiment of the present invention is shown in Figure 1, including:

步骤S11、从按照预设排序规则进行排序的待分析空间实体中选取当前待分析空间实体;Step S11. Select the current spatial entity to be analyzed from the spatial entities to be analyzed sorted according to the preset sorting rules;

当所述视图控制参数中的视图模式为二维模式时,所述预设排序规则为按照空间实体绘制顺序的逆序对空间实体进行排序。当所述视图控制参数中的视图模式为三维模式时,所述预设排序规则为按照空间实体离视点由近及远的顺序对空间实体进行排序。When the view mode in the view control parameter is a two-dimensional mode, the preset sorting rule is to sort the spatial entities in reverse order of the drawing order of the spatial entities. When the view mode in the view control parameter is a three-dimensional mode, the preset sorting rule is to sort the spatial entities in the order of the spatial entities from the viewpoint to the farthest.

步骤S12、依据预先设定的视图控制参数,将所述当前待分析空间实体的空间数据的原始坐标变换得到视图窗口的视图坐标;Step S12, transforming the original coordinates of the spatial data of the current spatial entity to be analyzed according to the preset view control parameters to obtain the view coordinates of the view window;

本实施例中的视图控制参数包括:视图模式和视图窗口的外包矩形参数。视图模式即根据实际的视图窗口预先设定视图窗口为二维模式还是三维模式。视图窗口的外包矩形参数是显示空间实体的视图窗口范围(0,0,ViewWidth,ViewHeight),如计算机屏幕地图显示窗口的范围,包括:视图窗口的外包矩形的宽度ViewWidth和视图窗口的外包矩形的高度ViewHeight,通过这两个参数,可以确定实际视图窗口中用于显示图像的窗口的大小范围。同时可以得到用于表示视图窗口的栅格数据的大小。如用m个字节表示一个像素值,则表示视图窗口的栅格数据的大小为:(ViewWidth*ViewHeight*m)。并且将用于表示视图窗口的栅格数据的初始值赋值为0。The view control parameters in this embodiment include: view mode and surrounding rectangle parameters of the view window. The view mode is to pre-set the view window as 2D mode or 3D mode according to the actual view window. The outer rectangle parameter of the view window is the view window range (0, 0, ViewWidth, ViewHeight) of the display space entity, such as the scope of the computer screen map display window, including: the width of the outer rectangle of the view window ViewWidth and the outer rectangle of the view window Height ViewHeight, through these two parameters, you can determine the size range of the window used to display images in the actual view window. At the same time, the size of the raster data used to represent the view window can be obtained. If m bytes are used to represent a pixel value, then the size of the grid data of the view window is: (ViewWidth*ViewHeight*m). And the initial value of the raster data used to represent the view window is assigned 0.

除包括视图模式和视图窗口的外包矩形参数外,根据视图模式的不同,视图控制参数的具体内容也不尽相同。当视图模式为二维模式时,还包括查询空间实体的矩形范围和视图中空间实体的放大比例,还可以利用所述空间实体在所述视图窗口下的中心坐标点替换查询空间实体的矩形范围,只要能实现将原始空间数据的原始坐标变换得到视图窗口的视图坐标即可。查询空间实体的矩形范围是指将此范围内的空间实体显示在视图窗口中,也就是在视图窗口中能显示出来的空间实体的外包矩形,其具体的范围值根据实际的显示情况而设定。当视图模式为三维模式时,还包括视点参数和投影参数,所述视点参数包括视点在预先设定的世界坐标系中的位置O(xo,yo,zo),xo,yo,zo表示视点在世界坐标系中的三个分量,视点所观察的目标位置A(xa,ya,za)和虚拟照相机向上的向量up(xup,yup,zup);所述投影参数包括:正交投影和透视投影。或者是依据上述参数获得的视图矩阵和投影矩阵,利用视图矩阵和投影矩阵进行坐标变换。根据不同的视图控制参数,将原始空间数据的原始坐标变换到对应模式下的视图窗口的视图坐标。In addition to including the view mode and the surrounding rectangle parameters of the view window, the specific content of the view control parameters is also different according to the view mode. When the view mode is two-dimensional mode, it also includes the rectangular range of the query spatial entity and the magnification ratio of the spatial entity in the view, and can also use the central coordinate point of the spatial entity under the view window to replace the rectangular range of the query spatial entity , as long as the original coordinates of the original spatial data can be transformed to obtain the view coordinates of the view window. Querying the rectangular range of a spatial entity refers to displaying the spatial entity within this range in the view window, that is, the surrounding rectangle of the spatial entity that can be displayed in the view window. The specific range value is set according to the actual display situation . When the view mode is a three-dimensional mode, it also includes viewpoint parameters and projection parameters, and the viewpoint parameters include the position O(x o , y o , z o ), x o , y o of the viewpoint in the preset world coordinate system , z o represents the three components of the viewpoint in the world coordinate system, the target position A(x a , y a , z a ) observed by the viewpoint and the upward vector up(x up , y up , z up ) of the virtual camera; The projection parameters include: orthogonal projection and perspective projection. Or the view matrix and projection matrix obtained according to the above parameters are used to perform coordinate transformation. Transform the original coordinates of the original space data into the view coordinates of the view window in the corresponding mode according to different view control parameters.

所述视图坐标对应的数据为视图数据,确定视图控制参数后,利用数据结构依据视图控制参数表示视图窗口。此处所述的表示视图窗口可以为实际可以进行显示的物理视图窗口,也可以是为了进行分析而生成的逻辑视图窗口环境。The data corresponding to the view coordinates is view data, and after the view control parameters are determined, the view window is represented by the data structure according to the view control parameters. The display view window mentioned here may be a physical view window that can be actually displayed, or a logical view window environment generated for analysis.

当利用栅格数据结构表示视图窗口时,用栅格数据表示二维栅格图像,把显示视图窗口平面划分成均匀的网格,每个网格单元称为像素,栅格数据结构就是像素阵列,栅格中的每个像素是栅格数据中最基本的信息存储单元,其坐标位置可以用行号和列号确定。由于栅格数据是按一定规则排列的,所以表示的空间实体位置关系是隐含在行号、列号之中的。每个像素值用于代表空间实体的属性或属性的编码。When the view window is represented by a raster data structure, the two-dimensional raster image is represented by raster data, and the display view window plane is divided into uniform grids. Each grid unit is called a pixel, and the raster data structure is a pixel array. , each pixel in the raster is the most basic information storage unit in raster data, and its coordinate position can be determined by row number and column number. Since raster data is arranged according to certain rules, the positional relationship of spatial entities represented is implicit in the row number and column number. Each pixel value is used to represent an attribute or an encoding of an attribute of a spatial entity.

依据预先设定的视图控制参数,将接收的原始空间数据的原始坐标变换得到视图窗口坐标系下的视图坐标,原始空间数据的原始坐标点对应视图窗口坐标系下的视图坐标点,每个视图坐标点与用栅格数据依据视图控制参数所表示的视图窗口的像素相对应,通过分析空间实体在所述视图窗口上显示时需要绘制的像素来分析空间实体在实际进行显示的视图窗口上显示时的遮挡情况。According to the preset view control parameters, the original coordinates of the received original space data are transformed to obtain the view coordinates in the view window coordinate system. The original coordinate points of the original space data correspond to the view coordinate points in the view window coordinate system. Each view The coordinate points correspond to the pixels of the view window represented by the grid data according to the view control parameters. By analyzing the pixels that need to be drawn when the spatial entity is displayed on the view window, it is analyzed that the spatial entity is displayed on the view window that is actually displayed. occlusion situation.

步骤S13、分析所述空间实体在所述视图窗口中的遮挡类型;Step S13, analyzing the occlusion type of the spatial entity in the view window;

遮挡类型包括:完全遮挡,即表示空间实体已被其它空间实体完全遮挡;部分遮挡,即表示所述空间实体被其它空间实体部分遮挡;未被遮挡,即表示空间实体未被其它空间实体遮挡。The occlusion types include: full occlusion, which means that the spatial entity is completely occluded by other spatial entities; partial occlusion, which means that the spatial entity is partially occluded by other spatial entities; not occluded, which means that the spatial entity is not occluded by other spatial entities.

具体的判断过程可以通过模拟空间实体在实际视图窗口上的显示过程来获得空间实体在视图窗口显示时需要绘制的像素,空间实体的显示过程一般是:对空间实体的空间数据进行一系列的几何变换和处理之后,变换为二维图像上的坐标点;根据显示参数,空间实体最终通过绘图算法栅格化成图像像素,绘制成一幅二维栅格图像,在屏幕上显示或输出。本发明基于上述过程,通过所述视图坐标依据绘图算法(如线段的绘图算法Bresenham算法)得到空间实体在所述视图窗口上显示时需要绘制的像素,然后判断所述需要绘制的像素的值,如果全部为1,则所述遮挡类型为完全遮挡;若全部为0;则所述遮挡类型为未被遮挡;若部分为1,则所述遮挡类型为部分遮挡,也就是说,只要所述需要绘制的像素中有像素值为1,所述空间实体就被其他空间实体所遮挡了。只要所述需要绘制的像素中有像素值为0,所述空间实体就没有被其他空间实体完全遮挡。The specific judgment process can obtain the pixels that the spatial entity needs to draw when the spatial entity is displayed in the view window by simulating the display process of the spatial entity on the actual view window. After transformation and processing, it is transformed into coordinate points on the two-dimensional image; according to the display parameters, the spatial entity is finally rasterized into image pixels through a drawing algorithm, drawn into a two-dimensional raster image, and displayed or output on the screen. The present invention is based on the above-mentioned process, obtains the pixel that needs to be drawn when the spatial entity is displayed on the view window through the view coordinates according to the drawing algorithm (such as the Bresenham algorithm for line segment drawing), and then judges the value of the pixel that needs to be drawn, If all are 1, the occlusion type is full occlusion; if all are 0; then the occlusion type is unoccluded; if part is 1, the occlusion type is partial occlusion, that is, as long as If there is a pixel value of 1 among the pixels to be drawn, the spatial entity is blocked by other spatial entities. As long as there is a pixel value of 0 among the pixels to be drawn, the spatial entity is not completely blocked by other spatial entities.

当所述空间实体没有被其他空间实体完全遮挡,即当所述空间实体的遮挡类型为未被遮挡和/或部分遮挡时,如果需要标示所述空间实体在所述像素上进行绘制,则可将所述空间实体在所述视图窗口上显示时需要绘制的像素中像素值为0的像素赋值为1,以保证后续判定空间实体遮挡类型的过程中,如果有其他的空间实体也要在上述像素上显示,就会被判定为被遮挡,以保证判定过程的准确性。When the spatial entity is not completely occluded by other spatial entities, that is, when the occlusion type of the spatial entity is not occluded and/or partially occluded, if it is necessary to mark the spatial entity for drawing on the pixel, you can When the spatial entity is displayed on the view window, the pixels with a pixel value of 0 are assigned a value of 1, so as to ensure that in the subsequent process of determining the occlusion type of the spatial entity, if there are other spatial entities, they must also be in the above-mentioned If it is displayed on the pixel, it will be judged as blocked to ensure the accuracy of the judgment process.

本实施例中对视图坐标进行的分析或处理是以单个像素或者将多个像素进行组合后进行的处理,可以根据实际情况的需要,灵活的设定具体的处理方式。其针对像素的具体操作除包括给像素赋值,即将空间数据进行栅格化外,还包括读取像素和对像素值进行判定,当像素以多个比特位来进行表示时,对像素的赋值可以表现为对一个像素整体赋值或者对表示像素的多个比特位中的任意一个或多个进行赋值;读取像素的操作也可以表现为对一个像素的整体值进行读取和读取像素中某个或某几个比特位的值;同理,对像素值的判定也为对一个像素的整体值或某个或某几个比特位的值所代表的含义进行判定。The analysis or processing of the view coordinates in this embodiment is performed by combining a single pixel or multiple pixels, and a specific processing method can be flexibly set according to actual needs. Its specific operations for pixels include not only assigning values to pixels, that is, rasterizing spatial data, but also reading pixels and judging pixel values. When pixels are represented by multiple bits, the assignment to pixels can be It is expressed as assigning a value to a pixel as a whole or assigning a value to any one or more of the multiple bits representing the pixel; the operation of reading a pixel can also be expressed as reading the overall value of a pixel and reading a certain value in a pixel The value of one or several bits; similarly, the judgment of the pixel value is also the judgment of the overall value of a pixel or the meaning represented by the value of one or several bits.

如用4个比特位数据表示模拟的视图窗口的一个像素,其中用第一个比特位表示是否有点要素在此像素上栅格化,第二个比特位表示是否有线要素在此像素上栅格化,第三个比特位是否有面要素在此像素上栅格化,第四个比特位用于空间矢量数据的化简。首先定义几个常量:For example, use 4 bits of data to represent a pixel of the simulated view window, where the first bit indicates whether a point element is rasterized on this pixel, and the second bit indicates whether a line element is rasterized on this pixel The third bit is whether there is a surface element to be rasterized on this pixel, and the fourth bit is used for the simplification of the space vector data. First define a few constants:

Figure GFW00000075442000091
Figure GFW00000075442000091

例如,对线空间实体所对应的像素操作方法如下所示:For example, the pixel operation method corresponding to the line space entity is as follows:

像素的赋值操作:用定义的常量line同像素值的或操作来对像素进行赋值,实现原始空间数据的栅格化。如给P(x,y)像素线栅格化操作,P(x,y)=P(x,y)line;清除原始空间数据栅格化操作,用定义的常量line进行取反后同像素值的与操作来清除,如清除P(x,y)像素线栅格化操作,P(x,y)=P(x,y)&~line。Pixel assignment operation: Use the OR operation of the defined constant line and the pixel value to assign a value to the pixel to realize the rasterization of the original spatial data. For example, for P(x, y) pixel line rasterization operation, P(x, y) = P(x, y) line; clear the original space data rasterization operation, use the defined constant line to invert and then the same pixel Value AND operation to clear, such as clearing P(x, y) pixel line rasterization operation, P(x, y)=P(x, y)&~line.

读取像素值:P(x,y)的栅格数据的值就是P(x,y)像素的值;Read the pixel value: the value of the raster data of P(x, y) is the value of the P(x, y) pixel;

像素值判定操作:例如,判定像素是否被原始空间数据栅格化操作,用定义的常量line同像素值的与操作来判定。如判定P(x,y)像素是否被线栅格化操作,则判定P(x,y)&line的值是否大于0,如果大于0,则P(x,y)像素被线空间实体栅格化,如果等于0,则P(x,y)像素没有被线空间实体栅格化。Pixel value determination operation: For example, to determine whether the pixel is rasterized by the original spatial data, use the AND operation of the defined constant line and the pixel value to determine. If it is determined whether the P(x, y) pixel is rasterized by the line, it is determined whether the value of P(x, y)&line is greater than 0. If it is greater than 0, the P(x, y) pixel is gridded by the line space entity If it is equal to 0, the P(x, y) pixel is not rasterized by the line space entity.

对于其它空间实体所对应的像素操作同样可以按照上述方法进行操作。The pixel operations corresponding to other spatial entities can also be operated according to the above method.

此步骤之后,还可以包括:After this step, you can also include:

步骤S14、判断是否存在未处理待分析空间实体,若是,则执行步骤S15,若否,则结束;Step S14, judging whether there is an unprocessed spatial entity to be analyzed, if yes, execute step S15, if not, end;

步骤S15、判断所述视图窗口中是否存在未处理像素,若是,则返回步骤S11,若否,则结束。Step S15 , judging whether there are unprocessed pixels in the view window, if yes, return to step S11 , if not, end.

本实施例公开的空间实体的遮挡类型的判定方法中,通过分析空间实体在所述视图窗口上显示时需要绘制的像素来分析空间实体在实际进行显示的视图窗口上的显示时的遮挡情况,保证空间实体之间遮挡计算的计算量小、算法简单高效,解决了海量空间实体遮挡类型的实时判断复杂困难的问题,提高了判定效率和判定结果的准确性。In the method for judging the occlusion type of the spatial entity disclosed in this embodiment, the occlusion of the spatial entity when it is actually displayed on the view window is analyzed by analyzing the pixels that need to be drawn when the spatial entity is displayed on the view window, It ensures that the calculation of occlusion calculation between spatial entities is small, and the algorithm is simple and efficient, which solves the problem of complex and difficult real-time judgment of the occlusion type of massive spatial entities, and improves the efficiency of judgment and the accuracy of judgment results.

本发明同时公开了一种依据上述空间实体遮挡类型的判定方法,判定空间实体为有效空间实体的方法,所述有效空间实体为对视图窗口中的像素绘制后能被显示出来的空间实体。具体流程如图2所示,本实施例公开的方法应用于服务器端,以二维视图模式为例,包括:The present invention also discloses a method for judging a space entity as an effective space entity based on the above-mentioned judging method of the occlusion type of the space entity, and the effective space entity is a space entity that can be displayed after drawing pixels in a view window. The specific process is shown in Figure 2. The method disclosed in this embodiment is applied to the server side, taking the two-dimensional view mode as an example, including:

步骤S21、从按照空间实体绘制顺序的逆序进行排序的空间实体中选取当前待分析空间实体;Step S21, selecting the current spatial entity to be analyzed from the spatial entities sorted according to the reverse order of the drawing order of the spatial entities;

步骤S22、依据预先设定的视图控制参数,将所述当前待分析空间实体的空间数据的原始坐标变换得到视图窗口的视图坐标;Step S22: Transform the original coordinates of the spatial data of the current spatial entity to be analyzed according to the preset view control parameters to obtain the view coordinates of the view window;

本实施例中的视图控制参数为客户端的实际显示的视图窗口的视图控制参数。The view control parameter in this embodiment is the view control parameter of the actually displayed view window of the client.

步骤S23、判断所述空间实体在所述视图窗口中显示时所需要绘制的像素的值是否全部为1,若是,则执行步骤S24a,若全部为0,则执行步骤S24b,若部分为1,则执行步骤S24c;Step S23, judging whether the values of the pixels that need to be drawn when the spatial entity is displayed in the view window are all 1, if so, then perform step S24a, if all are 0, then perform step S24b, if some are 1, Then execute step S24c;

步骤S24a、确定其遮挡类型为完全遮挡;Step S24a, determining that the occlusion type is complete occlusion;

步骤S24b、确定其遮挡类型为未被遮挡;Step S24b, determining that the occlusion type is not occluded;

步骤S24c、确定遮挡类型为部分遮挡;Step S24c, determining that the occlusion type is partial occlusion;

步骤S25、判断其遮挡类型是否符合预设有效空间实体条件,若是,则执行步骤S26a,若否,则执行步骤S26b;Step S25, judging whether the occlusion type meets the preset effective space entity condition, if yes, execute step S26a, if not, execute step S26b;

本实施例中的预设有效空间实体条件为遮挡类型为未被遮挡的空间实体。The preset effective spatial entity condition in this embodiment is a spatial entity whose occlusion type is not occluded.

步骤S26a、确定所述空间实体为有效空间实体,执行步骤S27;Step S26a, determine that the space entity is a valid space entity, and execute step S27;

步骤S26b、确定所述空间实体为无效空间实体,执行步骤S28;Step S26b, determine that the space entity is an invalid space entity, and execute step S28;

步骤S27、将所述有效空间实体在所述视图窗口上显示时需要绘制的像素赋值为1,以标示已经有空间实体在所述像素上进行绘制。Step S27 , assigning a value of 1 to the pixel that needs to be drawn when the effective spatial entity is displayed on the view window, to indicate that the spatial entity has already been drawn on the pixel.

当需要标示所述有效空间实体在所述像素上进行绘制时,同样可以将所述有效空间实体在所述视图窗口上显示时需要绘制的像素赋值为1,用于表示该像素已经用于显示所述有效空间实体,以保证后续判定空间实体遮挡类型的过程中将已经用于显示有效空间实体的像素值作为判别基础,如果有其他的空间实体也要在上述像素上显示,就会被遮挡,以保证判定过程的准确性。同时,如果空间实体有图示化信息,在分析和处理时要考虑图示化信息,如面实体的图示化信息为透明或半透明,若此面实体为有效空间实体,但此面实体所有要绘制的像素不进行赋值为1的操作。When it is necessary to indicate that the effective space entity is drawn on the pixel, the pixel that needs to be drawn when the effective space entity is displayed on the view window can also be assigned a value of 1, which is used to indicate that the pixel has been used for display The effective spatial entity is used to ensure that the pixel value that has been used to display the effective spatial entity is used as the basis for the judgment in the subsequent determination of the occlusion type of the spatial entity. If there are other spatial entities that are also displayed on the above-mentioned pixels, they will be blocked. , to ensure the accuracy of the judgment process. At the same time, if the spatial entity has graphical information, the graphical information should be considered during analysis and processing. For example, the graphical information of the surface entity is transparent or semi-transparent. If the surface entity is a valid spatial entity, but the surface entity All pixels to be drawn are not assigned a value of 1.

步骤S28、判断是否存在未处理待分析空间实体,若是,则执行步骤S29,若否,则结束;Step S28, judging whether there is an unprocessed spatial entity to be analyzed, if yes, execute step S29, if not, end;

步骤S29、判断所述视图窗口中是否存在未处理像素,若是,则返回步骤S21,若否,则结束。Step S29 , judging whether there are unprocessed pixels in the view window, if yes, return to step S21 , if not, end.

本实施例公开的判定有效空间实体的方法,对客户端请求的空间数据进行了预先处理,根据客户端的实际显示的视图控制参数,确定能够在实际的视图窗口中进行有效显示的空间实体为有效空间实体,其后续可相应的增加将有效空间实体进行选取并进行传输的步骤,保证了数据的无损显示的同时,大大缩减了数据传输量,提高了数据传输效率和显示效率。The method for determining valid spatial entities disclosed in this embodiment pre-processes the spatial data requested by the client, and determines the valid spatial entities that can be effectively displayed in the actual view window according to the view control parameters actually displayed by the client. For the space entity, the step of selecting and transmitting the effective space entity can be added correspondingly in the follow-up, which ensures the lossless display of data, greatly reduces the amount of data transmission, and improves the efficiency of data transmission and display.

将该方法应用于服务器端,对客户端请求的空间实体的海量数据依据客户端进行显示的视图窗口的视图控制参数进行处理,分析空间实体在所述视图窗口上的遮挡类型,进而判断该遮挡类型是否符合预设的有效空间实体条件,从而获得可以在客户端进行无损显示的有效数据进行传输,而无需传输在客户端的显示界面上无法看到的数据,缩减了数据传输量,提高了传输效率。Apply this method to the server side, process the mass data of the spatial entity requested by the client according to the view control parameters of the view window displayed by the client, analyze the occlusion type of the spatial entity on the view window, and then judge the occlusion Whether the type meets the preset effective space entity conditions, so as to obtain effective data that can be displayed on the client without loss for transmission, without the need to transmit data that cannot be seen on the display interface of the client, reducing the amount of data transmission and improving transmission. efficiency.

本实施例公开的判定有效空间实体的方法并不限定其具体的应用场景,其同样可以设置在客户端,对进行显示的海量空间实体数据的遮挡类型进行判定,并根据当前设定的有效空间实体条件,以确定出有效空间实体进行显示,从而保证了显示过程中不需显示无法看到的数据,提高了显示效率,如应用在该场景下,上述步骤中还可以包括,将确定的有效空间实体进行显示的步骤。The method for determining effective space entities disclosed in this embodiment does not limit its specific application scenarios. It can also be set on the client to determine the occlusion type of massive space entity data to be displayed, and according to the currently set effective space Entity conditions to determine the effective space entity for display, thus ensuring that the data that cannot be seen does not need to be displayed during the display process, and the display efficiency is improved. If it is applied in this scenario, the above steps can also include determining the effective space Steps for displaying spatial entities.

当然,本实施例并不限定上述两种应用场景,可以根据实际的应用情况而自行设定该方法的使用场景,同样也可以同时应用于客户端和服务器端。而在将有效空间实体进行判定后,同样可以包括将有效空间实体的数据进行化简、渐进传输等后续处理,在此不再一一列举,凡是利用上述对空间实体遮挡类型进行判定的方案来进行有效空间实体判定的过程,都属于本实施例的保护范围。Of course, this embodiment does not limit the above two application scenarios, and the application scenarios of the method can be set according to actual application conditions, and can also be applied to both the client and the server. After the effective spatial entity is judged, subsequent processing such as simplification and progressive transmission of the data of the effective spatial entity may also be included, which will not be listed one by one here. The process of determining the effective space entity belongs to the protection scope of this embodiment.

本发明同时公开了一种空间实体遮挡类型的判定装置,其结构如图3所示,包括:选取单元31、坐标转换单元32、遮挡类型分析单元33,其中,选取单元31用于从按照预设排序规则进行排序的待分析空间实体中选取当前待分析空间实体;坐标转换单元32用于依据预先设定的视图控制参数,将所述当前待分析空间实体的原始空间数据的原始坐标变换得到视图窗口的视图坐标;遮挡类型分析单元33用于分析所述空间实体在所述视图窗口中的遮挡类型。The present invention also discloses a device for judging the occlusion type of a spatial entity, its structure is shown in Figure 3, comprising: a selection unit 31, a coordinate conversion unit 32, and an occlusion type analysis unit 33, wherein the selection unit 31 is used to select Select the current spatial entity to be analyzed from the spatial entities to be analyzed according to the sorting rules; the coordinate conversion unit 32 is used to transform the original coordinates of the original spatial data of the current spatial entity to be analyzed according to the preset view control parameters to obtain The view coordinates of the view window; the occlusion type analysis unit 33 is used to analyze the occlusion type of the spatial entity in the view window.

其中,各单元的处理过程如下所述:Among them, the processing process of each unit is as follows:

选取单元从按照预设排序规则进行排序的待分析空间实体中选取当前待分析空间实体,如果是二维模式,则预设排序规则为按照空间实体绘制顺序的逆序进行排序,如果是三维模式,则预设排序规则为按照空间实体离视点由近及远的顺序进行排序,对排序后的空间实体进行按序选取。坐标变换单元将选取的空间实体的空间数据的原始坐标按照视图控制参数进行坐标变换,变换到利用数据结构依据视图控制参数进行表示的视图窗口下的视图坐标,利用遮挡类型分析单元分析空间实体的遮挡类型,具体过程包括判断所述空间实体在所述视图窗口中所需要绘制的像素的值是否全部为1,若全部为1,则所述遮挡类型为完全遮挡;若全部为0,则所述遮挡类型为未被遮挡;若部分为1,则所述遮挡类型为部分遮挡,从而确定出当前被分析的空间实体的遮挡类型是完全遮挡、部分遮挡还是未被遮挡。The selection unit selects the current spatial entity to be analyzed from the spatial entities to be analyzed sorted according to the preset sorting rules. If it is a two-dimensional mode, the default sorting rule is to sort in the reverse order of the drawing order of the spatial entities. If it is a three-dimensional mode, Then, the default sorting rule is to sort the spatial entities in the order of the distance from the viewpoint to the farthest, and select the sorted spatial entities in order. The coordinate transformation unit transforms the original coordinates of the spatial data of the selected spatial entity according to the view control parameters, transforms them into the view coordinates under the view window represented by the data structure according to the view control parameters, and uses the occlusion type analysis unit to analyze the spatial entity The occlusion type, the specific process includes judging whether the values of the pixels that the spatial entity needs to draw in the view window are all 1, if all are 1, then the occlusion type is complete occlusion; if all are 0, then the The occlusion type is not occluded; if part is 1, the occlusion type is partial occlusion, so as to determine whether the occlusion type of the currently analyzed spatial entity is fully occluded, partially occluded or not occluded.

对当前的空间实体处理完后,判断该空间实体是否是最后一个空间实体,如果是,则结束,如果不是,则判断利用数据结构表示的视图窗口中,是否还有未处理的像素,如果是,则按照上述的顺序,选取下一个空间实体,进行处理,如果视图窗口中没有未处理的像素,则结束,直到将全部空间实体处理完,或者利用数据结构表示的视图窗口中不存在未处理的像素为止。After processing the current spatial entity, judge whether the spatial entity is the last spatial entity, if yes, end, if not, then judge whether there are unprocessed pixels in the view window represented by the data structure, if yes , according to the above sequence, select the next spatial entity and process it. If there are no unprocessed pixels in the view window, it will end until all spatial entities are processed, or there are no unprocessed pixels in the view window represented by the data structure. of pixels.

本装置中还可以包括有效空间实体确定单元,其预先设定了有效空间实体的条件,其可以是未被遮挡的空间实体,也可以是部分遮挡的空间实体,或者是两者的结合,判断空间实体的遮挡类型是否符合有效空间实体的条件,如果符合,则确定所述空间实体为有效空间实体,后续过程中还可将所述有效空间实体在所述视图窗口上显示时需要绘制的像素赋值为1,以标示已经有空间实体在所述像素上进行绘制。The device may also include an effective space entity determination unit, which pre-sets the conditions of an effective space entity, which may be an unoccluded space entity, or a partially occluded space entity, or a combination of the two. Whether the occlusion type of the spatial entity meets the conditions of a valid spatial entity, and if yes, then determine that the spatial entity is a valid spatial entity, and in the subsequent process, the pixels that need to be drawn when the valid spatial entity is displayed on the view window Assign a value of 1 to indicate that a spatial entity has been drawn on the pixel.

本实施例公开的空间实体遮挡类型的判定装置的执行过程为对应于上述本发明实施例所公开的方法实施例流程,为较佳的装置实施例,其具体执行过程可参见上述方法实施例,在此不再赘述。The execution process of the device for determining the occlusion type of a space entity disclosed in this embodiment corresponds to the flow of the method embodiment disclosed in the above-mentioned embodiment of the present invention, and is a preferred device embodiment. For the specific execution process, please refer to the above-mentioned method embodiment. I won't repeat them here.

本发明公开的空间实体遮挡类型的判定装置可以设置在计算机内,也可以设置在手机或其他可以使用本发明的设备内,或者是其他智能设备。其既可以设置在服务器端,在将客户端请求的数据发送之前,首先对空间实体的遮挡类型进行判定,也可将其设置在客户端,在将空间实体发送到实际的视图窗口前,对空间实体的遮挡类型进行判定,或者同时设置在服务器和客户端,根据实际情况选择由哪一方或者双方共同进行处理。The device for judging the occlusion type of a spatial entity disclosed in the present invention can be set in a computer, or in a mobile phone or other devices that can use the present invention, or other smart devices. It can be set on the server side to determine the occlusion type of the spatial entity before sending the data requested by the client, or it can be set on the client side to determine the occlusion type of the spatial entity before sending the spatial entity to the actual view window. The occlusion type of the spatial entity is judged, or it is set on the server and the client at the same time, and which side or both parties are selected to handle it according to the actual situation.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related information, please refer to the description of the method part.

专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1.一种应用于服务器端的空间实体遮挡类型的判定方法,其特征在于,包括:1. A method for judging a spatial entity occlusion type applied to a server, characterized in that it comprises: 从按照预设排序规则进行排序的待分析空间实体中选取当前待分析空间实体;Select the current spatial entity to be analyzed from the spatial entities to be analyzed sorted according to the preset sorting rules; 依据客户端预先设定的视图控制参数,将所述当前待分析空间实体的原始空间数据的原始坐标变换得到视图窗口的视图坐标,所视图控制参数包括:视图模式和视图窗口的外包矩形参数;所述视图模式包括:二维模式和三维模式,所述视图窗口的外包矩形参数包括:视图窗口的外包矩形的宽度和视图窗口的外包矩形的高度;According to the view control parameters preset by the client, transforming the original coordinates of the original spatial data of the current spatial entity to be analyzed to obtain the view coordinates of the view window, the view control parameters include: view mode and the surrounding rectangle parameters of the view window; The view mode includes: two-dimensional mode and three-dimensional mode, and the surrounding rectangle parameters of the view window include: the width of the surrounding rectangle of the view window and the height of the surrounding rectangle of the view window; 当所述视图模式为二维模式时,所述视图控制参数还包括:空间实体在所述视图窗口中的中心坐标点和视图中空间实体的放大比例,或者查询空间实体的矩形范围和视图中空间实体的放大比例;When the view mode is a two-dimensional mode, the view control parameters also include: the central coordinate point of the spatial entity in the view window and the magnification ratio of the spatial entity in the view, or query the rectangular range and view of the spatial entity The magnification ratio of the spatial entity; 当所述视图模式为三维模式时,所述视图控制参数还包括:视点参数和投影参数,所述视点参数包括视点在世界坐标系中的位置、视点所观察的目标位置和虚拟照相机向上的向量;所述投影参数包括:正交投影和透视投影;When the view mode is a three-dimensional mode, the view control parameters also include: viewpoint parameters and projection parameters, the viewpoint parameters include the position of the viewpoint in the world coordinate system, the target position observed by the viewpoint and the upward vector of the virtual camera ; The projection parameters include: orthogonal projection and perspective projection; 当所述视图控制参数中的视图模式为二维模式时,所述预设排序规则为按照空间实体绘制顺序的逆序对空间实体进行排序,当所述视图控制参数中的视图模式为三维模式时,所述预设排序规则为按照空间实体离视点由近及远的顺序对空间实体进行排序;When the view mode in the view control parameter is a two-dimensional mode, the preset sorting rule is to sort the spatial entities in the reverse order of the drawing order of the spatial entities; when the view mode in the view control parameters is a three-dimensional mode , the preset sorting rule is to sort the spatial entities in the order that the spatial entities are near and far from the viewpoint; 分析所述空间实体在所述视图窗口中的遮挡类型;analyzing the occlusion type of the spatial entity in the view window; 判断所述空间实体的遮挡类型是否符合预设有效空间实体条件,若是,则确定所述空间实体为有效空间实体,若否,则确定所述空间实体为无效空间实体;Judging whether the occlusion type of the space entity meets the preset valid space entity condition, if so, determining that the space entity is a valid space entity, and if not, determining that the space entity is an invalid space entity; 选取所述有效空间实体;selecting the active space entity; 将所述有效空间实体传输到客户端。The valid space entity is transmitted to the client. 2.根据权利要求1所述的方法,其特征在于,所述视图窗口利用数据结构依据所述视图控制参数进行表示,具体为:依据所述视图控制参数用栅格数据结构来表示所述视图窗口的像素,所述像素为所述视图窗口平面划分成的均匀网格单元,所述像素为所述栅格数据中的基本信息存储单元,所述像素的坐标位置依据所述像素在所述视图窗口中对应的行号和列号确定,设定表示所述像素的栅格数据的初始值全部为0。2. The method according to claim 1, wherein the view window is represented by a data structure according to the view control parameters, specifically: representing the view by a grid data structure according to the view control parameters The pixel of the window, the pixel is a uniform grid unit divided into the plane of the view window, the pixel is the basic information storage unit in the raster data, and the coordinate position of the pixel is based on the pixel in the The corresponding row number and column number in the view window are determined, and the initial values of the raster data representing the pixel are all set to 0. 3.根据权利要求2所述的方法,其特征在于,所述分析所述空间实体在所述视图窗口中的遮挡类型的过程包括:3. The method according to claim 2, wherein the process of analyzing the occlusion type of the spatial entity in the view window comprises: 判断所述空间实体在所述视图窗口中显示时需要绘制的像素的值是否全部为1,若全部为1,则所述遮挡类型为完全遮挡;若全部为0,则所述遮挡类型为未被遮挡;若部分为1,则所述遮挡类型为部分遮挡。Determine whether the values of the pixels that need to be drawn when the spatial entity is displayed in the view window are all 1, if all are 1, then the occlusion type is complete occlusion; if all are 0, then the occlusion type is not Occluded; if part is 1, the occlusion type is partial occlusion. 4.根据权利要求3所述的方法,其特征在于,还包括:当所述空间实体的遮挡类型为未被遮挡和/或部分遮挡时,将所述空间实体在所述视图窗口上显示时需要绘制的像素中像素值为0的像素赋值为1。4. The method according to claim 3, further comprising: when the occlusion type of the spatial entity is unoccluded and/or partially occluded, displaying the spatial entity on the view window Among the pixels that need to be drawn, the pixels with a pixel value of 0 are assigned a value of 1. 5.根据权利要求1所述的方法,其特征在于,所述预设有效空间实体的条件包括:遮挡类型为未被遮挡的空间实体或遮挡类型为未被遮挡和部分被遮挡的空间实体。5 . The method according to claim 1 , wherein the preset conditions for valid spatial entities include: the occlusion type is an unoccluded spatial entity or the occlusion type is an unoccluded and partially occluded spatial entity. 5 . 6.一种应用于服务器端的空间实体遮挡类型的判定装置,其特征在于,包括:6. A device for judging the type of spatial entity occlusion applied to the server, characterized in that it comprises: 选取单元,用于从按照预设排序规则进行排序的待分析空间实体中选取当前待分析空间实体;The selection unit is used to select the current spatial entity to be analyzed from the spatial entities to be analyzed sorted according to the preset sorting rules; 坐标转换单元,依据客户端预先设定的视图控制参数,将所述当前待分析空间实体的原始空间数据的原始坐标变换得到视图窗口的视图坐标,所视图控制参数包括:视图模式和视图窗口的外包矩形参数;所述视图模式包括:二维模式和三维模式,所述视图窗口的外包矩形参数包括:视图窗口的外包矩形的宽度和视图窗口的外包矩形的高度;The coordinate conversion unit transforms the original coordinates of the original spatial data of the current spatial entity to be analyzed according to the view control parameters preset by the client to obtain the view coordinates of the view window. The view control parameters include: view mode and view window Outer rectangle parameter; the view mode includes: two-dimensional mode and three-dimensional mode, the outer rectangle parameter of the view window includes: the width of the outer rectangle of the view window and the height of the outer rectangle of the view window; 当所述视图模式为二维模式时,所述视图控制参数还包括:空间实体在所述视图窗口中的中心坐标点和视图中空间实体的放大比例,或者查询空间实体的矩形范围和视图中空间实体的放大比例;When the view mode is a two-dimensional mode, the view control parameters also include: the central coordinate point of the spatial entity in the view window and the magnification ratio of the spatial entity in the view, or query the rectangular range and view of the spatial entity The magnification ratio of the spatial entity; 当所述视图模式为三维模式时,所述视图控制参数还包括:视点参数和投影参数,所述视点参数包括视点在世界坐标系中的位置、视点所观察的目标位置和虚拟照相机向上的向量;所述投影参数包括:正交投影和透视投影;When the view mode is a three-dimensional mode, the view control parameters also include: viewpoint parameters and projection parameters, the viewpoint parameters include the position of the viewpoint in the world coordinate system, the target position observed by the viewpoint and the upward vector of the virtual camera ; The projection parameters include: orthogonal projection and perspective projection; 当所述视图控制参数中的视图模式为二维模式时,所述选取单元从按照空间实体绘制顺序的逆序对空间实体进行排序的待分析空间实体中选取当前待分析空间实体,当所述视图控制参数中的视图模式为三维模式时,所述选取单元从按照空间实体离视点由近及远的顺序对空间实体进行排序的待分析空间实体中选取当前待分析空间实体;When the view mode in the view control parameter is a two-dimensional mode, the selection unit selects the current spatial entity to be analyzed from the spatial entities to be analyzed that are sorted according to the reverse order of the drawing order of the spatial entities, when the view When the view mode in the control parameter is a three-dimensional mode, the selection unit selects the current spatial entity to be analyzed from the spatial entities to be analyzed that sort the spatial entities in the order of the spatial entities from the viewpoint to the farthest; 遮挡类型分析单元,用于分析所述空间实体在所述视图窗口中的遮挡类型;an occlusion type analysis unit, configured to analyze the occlusion type of the spatial entity in the view window; 判断单元,用于判断所述空间实体的遮挡类型是否符合预设有效空间实体条件,若是,则确定所述空间实体为有效空间实体,若否,则确定所述空间实体为无效空间实体;A judging unit, configured to judge whether the occlusion type of the space entity meets the preset valid space entity condition, if so, determine that the space entity is a valid space entity, and if not, determine that the space entity is an invalid space entity; 选取单元,用于选取所述有效空间实体,并将所述有效空间实体传输到客户端。The selection unit is configured to select the effective space entity and transmit the effective space entity to the client.
CN 201010617403 2010-01-07 2010-12-31 Method and device for determining type of barrier of spatial entity Expired - Fee Related CN102074004B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010617403 CN102074004B (en) 2010-01-07 2010-12-31 Method and device for determining type of barrier of spatial entity

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
CN201010017269.2 2010-01-07
CN201010017269 2010-01-07
CN201010144131.9 2010-03-21
CN201010144131A CN101814094A (en) 2010-01-07 2010-03-21 Method for selecting spatial entities based on view models of spatial entities
CN 201010617403 CN102074004B (en) 2010-01-07 2010-12-31 Method and device for determining type of barrier of spatial entity

Publications (2)

Publication Number Publication Date
CN102074004A CN102074004A (en) 2011-05-25
CN102074004B true CN102074004B (en) 2013-09-25

Family

ID=44032534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010617403 Expired - Fee Related CN102074004B (en) 2010-01-07 2010-12-31 Method and device for determining type of barrier of spatial entity

Country Status (2)

Country Link
CN (1) CN102074004B (en)
WO (1) WO2011082651A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485654B (en) * 2011-11-08 2021-10-26 苏州超擎图形软件科技发展有限公司 Vector data processing method and device
CN106898051B (en) * 2017-04-14 2019-02-19 腾讯科技(深圳)有限公司 A kind of visual field elimination method and server of virtual role
CN109377552B (en) * 2018-10-19 2023-06-13 珠海金山数字网络科技有限公司 Image occlusion calculating method, device, calculating equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480205B1 (en) * 1998-07-22 2002-11-12 Nvidia Corporation Method and apparatus for occlusion culling in graphics systems
US6924801B1 (en) * 1999-02-09 2005-08-02 Microsoft Corporation Method and apparatus for early culling of occluded objects
CN101170673A (en) * 2006-10-23 2008-04-30 三星电子株式会社 Device for detecting occlusion area and method thereof
CN101312540A (en) * 2008-07-03 2008-11-26 浙江大学 A Virtual Viewpoint Synthesis Method Based on Depth and Occlusion Information

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2683192A (en) * 1991-09-17 1993-04-27 General Physics International Engineering & Simulation, Inc. Real time analysis of power plant thermohydraulic phenomenon
CN101515372B (en) * 2009-02-04 2011-12-07 北京石油化工学院 Visual analyzing and predicting method based on a virtual geological model
CN101814094A (en) * 2010-01-07 2010-08-25 董福田 Method for selecting spatial entities based on view models of spatial entities

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480205B1 (en) * 1998-07-22 2002-11-12 Nvidia Corporation Method and apparatus for occlusion culling in graphics systems
US6924801B1 (en) * 1999-02-09 2005-08-02 Microsoft Corporation Method and apparatus for early culling of occluded objects
CN101170673A (en) * 2006-10-23 2008-04-30 三星电子株式会社 Device for detecting occlusion area and method thereof
CN101312540A (en) * 2008-07-03 2008-11-26 浙江大学 A Virtual Viewpoint Synthesis Method Based on Depth and Occlusion Information

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
靳海亮 等.图形消隐算法综述.《计算机与数字工程》.2006,第34卷(第9期),全文. *

Also Published As

Publication number Publication date
WO2011082651A1 (en) 2011-07-14
CN102074004A (en) 2011-05-25

Similar Documents

Publication Publication Date Title
CN102110280B (en) Spatial data processing method and device
CN102096945B (en) Progressive transmission of spatial data and device
WO2012037863A1 (en) Method for simplifying and progressively transmitting 3d model data and device therefor
CN112100795B (en) Computer aided design drawing comparison method and device
JP2009545827A (en) Graphic system using pixel mask
US10540789B2 (en) Line stylization through graphics processor unit (GPU) textures
CN114491351B (en) Lattice point data visualization method and system adaptable to WebGIS platform
GB2406252A (en) Generation of texture maps for use in 3D computer graphics
US9576381B2 (en) Method and device for simplifying space data
CN102074004B (en) Method and device for determining type of barrier of spatial entity
AU2020449562B2 (en) Geometry-aware augmented reality effects with a real-time depth map
CN106485654B (en) Vector data processing method and device
CN111145302B (en) Vector map square dotted line symbol drawing method considering line width consistency
CN102053837A (en) Collision detection and avoidance method and device for space entity element marking
CN112634431A (en) Method and device for converting three-dimensional texture map into three-dimensional point cloud
EP4174781A2 (en) Method and apparatus for processing three dimensional graphic data, device, storage medium and product
CN102682083B (en) Method and device for processing, abbreviating and progressively transmitting space data
CN111145301B (en) A method for drawing the end of solid-line symbols on vector maps considering the consistency of line width
CN110490979B (en) Device and method for virtual-real fusion based on depth map in Web environment
CN102956028B (en) The cross-platform method and apparatus accelerating transmission and display of graph data
CN118864683B (en) Three-dimensional thermodynamic diagram generation method and device, storage medium and electronic equipment
CN117557711B (en) Method, device, computer equipment and storage medium for determining visual field
US20240371079A1 (en) Face-Oriented Geometry Streaming
CN118864688A (en) A texture rendering method, device, equipment, medium and program product
US20090096792A1 (en) Fill mode determination in vector graphics

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: SUZHOU SUPERENGINE IMAGE SOFTWARE TECHNOLOGY DEVEL

Free format text: FORMER OWNER: DONG FUTIAN

Effective date: 20140312

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 215021 SUZHOU, JIANGSU PROVINCE TO: 215123 SUZHOU, JIANGSU PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20140312

Address after: 412 room 215123, tower 262, Dongping street, Suzhou Industrial Park, Jiangsu, China

Patentee after: SUZHOU SUPERENGINE GRAPHICS SOFTWARE TECHNOLOGY DEVELOPMENT CO.,LTD.

Address before: Suzhou City, Jiangsu province 215021 City Garden Road Industrial Park and high cloud in 55 room 103

Patentee before: Dong Futian

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130925