WO2018201663A1 - Solid figure display method, device and equipment - Google Patents
Solid figure display method, device and equipment Download PDFInfo
- Publication number
- WO2018201663A1 WO2018201663A1 PCT/CN2017/104369 CN2017104369W WO2018201663A1 WO 2018201663 A1 WO2018201663 A1 WO 2018201663A1 CN 2017104369 W CN2017104369 W CN 2017104369W WO 2018201663 A1 WO2018201663 A1 WO 2018201663A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- viewing angle
- vertex
- visible
- ridge line
- determining
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2016—Rotation, translation, scaling
Definitions
- the present application relates to the field of computer technology, and in particular, to a method, device and device for stereoscopic graphic display.
- the display of the outline of the three-dimensional graphics is often involved.
- the outlines of the three-dimensional graphics that we can see are often displayed in solid lines, and the contours that we cannot see are obscured by the solid graphics are often shown by dashed lines.
- the above display effect is usually implemented in a pseudo 3D manner, that is, the outline of the graphic at the viewing angle is manually drawn in a 2D drawing manner under a specific viewing angle.
- a pseudo 3D manner that is, the outline of the graphic at the viewing angle is manually drawn in a 2D drawing manner under a specific viewing angle.
- the embodiment of the invention provides a method, a device and a device for displaying a three-dimensional graphic, which are used to solve the problem that the prior art can only display the contour of the three-dimensional graphic with a specific viewing angle, and the user experience is poor.
- a method for displaying a three-dimensional graphic wherein the three-dimensional graphic is composed of a ridge line, and the method includes:
- the visible ridge line is displayed separately from the invisible ridge line.
- a device for displaying a three-dimensional graphic wherein the three-dimensional graphic is composed of a ridge line, and the device comprises:
- a display unit configured to display the stereoscopic graphic on a graphical user interface
- a receiving unit configured to receive a rotation operation instruction for the stereo graphic
- a transforming unit configured to transform a viewing angle of the stereoscopic graphic display according to the rotating operation instruction
- a judging unit configured to determine, in real time, the visibility of each ridge line at the current viewing angle according to the change of the viewing angle of the stereoscopic graphic display
- the display unit is further configured to display the visible ridge line and the invisible ridge line separately according to the visibility of each of the ridge lines.
- a computer apparatus includes a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when the processor executes the program Implement the following steps:
- each ridgeline of the stereoscopic image at the current viewing angle is determined in real time as the viewing angle of the stereoscopic graphic changes;
- the visible ridge line is displayed separately from the invisible ridge line.
- the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle.
- real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
- Figure 1 is a perspective view of a cube at a particular angle of view
- FIG. 2 is a flow chart of an embodiment of a method for displaying a three-dimensional graphic according to the present invention
- FIG. 3 is a flow chart of another embodiment of a method for displaying a three-dimensional graphic according to the present invention.
- Figure 4 is another perspective view of a cube at a particular viewing angle
- FIG. 5 is a hardware structural diagram of a device where a device for stereoscopic graphic display is located
- Figure 6 is a block diagram of one embodiment of an apparatus for stereoscopic graphics display of the present invention.
- FIG. 2 is a flowchart of an embodiment of a method for displaying a three-dimensional graphic according to the present invention.
- the three-dimensional graphic is composed of ridge lines, and the method includes the following steps:
- Step 201 Display the stereoscopic graphic on a graphical user interface.
- the above-mentioned three-dimensional figure composed of ridge lines may be a rectangular parallelepiped, a pyramid, a prism, and a polyhedron.
- Step 202 Receive a rotation operation instruction for the stereoscopic graphic.
- Step 203 Transform a viewing angle of the stereoscopic graphic display according to the rotation operation instruction.
- Step 204 Determine the visibility of each ridge line at the current viewing angle in real time as the stereoscopic graphic displays the change of the viewing angle.
- the above determination of the visibility of each ridgeline at the current viewing angle can be achieved by judging the visibility of the two vertices of each ridge at the current perspective: if the vertices of any of the ridges are at the current viewing angle If all are visible, it is determined that any of the ridge lines are visible at the current viewing angle; if both vertices of any of the ridge lines are not visible at the current viewing angle, it is determined that any of the ridge lines are invisible at the current viewing angle.
- the vertices in the current view can be determined by the projection matrix of the current view and the hit test provided by the three-dimensional engine.
- the specific execution manner may include: determining, by using a projection matrix of the current view, the vertices corresponding to the current view. a projection point of the projection plane; determining a hit point of the projection point in the stereoscopic image by a hit test provided by the three-dimensional engine; determining whether the hit point and the vertex satisfy a preset approximate coincidence condition; if yes, determining the vertex The current view is visible, and if not, it is determined that the vertex is invisible at the current view.
- the preset approximate coincidence condition may be a preset threshold value about the distance between the hit point and the vertex in the stereo graphic, and the hit point and the vertex are approximated when the distance between the hit point and the vertex in the stereo graphic is less than the preset threshold.
- the preset approximate coincidence condition may also be a preset error about the three-dimensional coordinates of the hit point and the vertex in the solid figure, when the error of the three-dimensional coordinates of the hit point and the three-dimensional coordinates of the vertex in any dimension is less than the preset error Then it is determined that the hit point and the vertices approximately coincide.
- Step 205 Display the visible ridge line and the invisible ridge line according to the visibility of each ridge line.
- the above distinguishing display can be:
- gradation may be different gradations of the same color or different gradations of different colors
- the difference between the visible ridge line and the invisible ridge line is displayed by using the different thicknesses of the lines.
- the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle.
- real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
- FIG. 3 is a flow chart of another embodiment of a method for displaying a three-dimensional graphic according to the present invention.
- the embodiment describes a display process of a three-dimensional graphic, wherein the three-dimensional graphic is composed of ridge lines, and the method includes The following steps:
- Step 301 Display the stereoscopic graphic on the graphical user interface, receive a rotation operation instruction for the stereoscopic graphic, and transform the display viewing angle of the stereoscopic graphic according to the above instruction.
- the above-mentioned three-dimensional figure composed of ridge lines may be a rectangular parallelepiped, a pyramid, a prism, and a polyhedron.
- Step 302 The projection point of the vertices at the projection plane corresponding to the current perspective is determined in real time by the projection matrix of the current perspective.
- Step 303 Determine, by a hit test provided by the three-dimensional engine, a hit point of the projection point in the stereoscopic graphic in real time.
- point H is one of the eight vertices of the illustrated cube, and the angle of view is displayed as shown in the figure, at which point H is an invisible point.
- Point H' is a point on the ABEF plane of the cube shown. If the illustrated cube image is viewed as a perspective view of the current perspective, point H' will occlude point H at the current perspective, where the two-dimensional plane in which the perspective is located is the projection plane, point H in the perspective
- the projection of the (projection plane) is the projection point of the point H, and the point H' is the hit point of the projection point of the point H.
- Step 304 Calculate in real time whether the distance between the vertex and the hit point in the stereo graphic is less than a preset distance threshold. If yes, go to step 305, if no, go to step 306.
- the preset distance threshold may be a fixed value; or may be a dynamic value that changes according to the size of the stereo graphic. Specifically, the preset distance threshold may be determined as a ratio with respect to the stereo graphic. It should be noted that the above distance threshold determines the accuracy of the vertex visibility judgment. To ensure the judgment accuracy, the distance threshold should be as small as possible, and a normal value is 1 pixel.
- Step 305 It is determined that the above vertices are visible at the current viewing angle.
- Step 306 It is determined that the above vertex is invisible at the current viewing angle.
- Step 307 Determine whether both vertices of any ridge are visible in the current view, if yes, go to step 307, if otherwise, go to step 308.
- Step 308 It is determined that any of the above ridgelines are visible at the current viewing angle.
- Step 309 It is determined that any of the above ridge lines are invisible at the current viewing angle.
- Step 310 Display the visible ridge line and the invisible ridge line separately by using a solid line and a broken line.
- the above distinguishing display can be:
- gradation may be different gradations of the same color or different gradations of different colors
- the difference between the visible ridge line and the invisible ridge line is displayed by using the different thicknesses of the lines.
- the surface clicked on the user can also be achieved through the hit test.
- the judgment of the user clicks on the surface of the user and the other surfaces of the three-dimensional graphic may be specifically included:
- the target surface ABFE is colored and displayed.
- the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle.
- real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
- the embodiments of the present invention are described below with reference to a specific application example.
- the application example is described in conjunction with the cube shown in FIG. 4, wherein it is assumed that the illustrated cube can be moved in any direction or rotated in any axis, and it is required to display the line in real time in real time.
- the outline is visible and its invisible outline is shown with a dashed line.
- the display process is as follows:
- the projection point M of the current viewing angle is used to determine the projection point of the 8 vertices of the illustrated square at the projection plane corresponding to the current viewing angle, taking the viewing angle and the vertex H shown in FIG. 4 as an example.
- the projection point can be expressed as H*M;
- the hit points of the 8 vertices of the illustrated cube at the current perspective projection point are determined in real time, taking the angle of view shown in FIG. 4 and the projection point H*M as an example, through the hit test, the projection point
- the three-dimensional hit point of H*M in the solid figure is H';
- the ridge lines AB, AD, AE, CD, CB, CG, FB, FE, FG are visible ridges and ridges HD according to the visibility of the eight vertices of the square.
- HE, HG are invisible ridge lines;
- the visible ridge line and the invisible ridge line are displayed in real time and in different directions by the solid line and the broken line respectively, and the angle of view shown in FIG. 4 is taken as an example, and the ridge line AB, AD, AE, CD, CB CG, FB, FE, and FG are displayed in solid lines, and ridge lines HD, HE, and HG are displayed in broken lines.
- the present application also provides an embodiment of a device for stereoscopic graphic display.
- the device embodiment of the three-dimensional graphic display of the present application may be implemented by software, or may be implemented by hardware or a combination of hardware and software.
- the processor of the device in which it is located reads the corresponding computer program instructions in the non-volatile memory into the memory.
- FIG. 5 a hardware structure diagram of a device in which the device for stereoscopic graphic display is located, except for the processor, the memory, the network interface, and the non-volatile memory shown in FIG.
- the device in which the device is located in the embodiment may also include other hardware according to the actual function of the device, and details are not described herein again.
- FIG. 6 is a block diagram of an embodiment of a device for stereoscopic graphics display.
- the stereoscopic graphics are composed of ridge lines.
- the device includes: a display unit 610, a receiving unit 620, a transform unit 630, and a determining unit 640.
- a display unit 610 configured to display the stereoscopic graphic on a graphical user interface
- the receiving unit 620 is configured to receive a rotation operation instruction for the stereo graphic.
- a transforming unit 630 configured to transform a viewing angle of the stereoscopic graphic display according to the rotating operation instruction
- the determining unit 640 is configured to determine, in real time, the visibility of each ridge line at the current viewing angle according to the change of the viewing angle of the stereoscopic graphic display;
- the display unit 610 is further configured to display the visible ridge line and the invisible ridge line separately according to the visibility of each ridge line.
- the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle.
- real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
- the determining unit 640 includes (not shown in FIG. 6): a vertex determining subunit, and an ridge line judging subunit.
- a vertex determining sub-unit for determining the visibility of the vertices of any of the ridges at the current perspective
- a ridge line judging subunit configured to determine that any of the vertices are visible at a current viewing angle when both vertices of the ridge line are visible at a current viewing angle, when the two vertices of the ridge line are at a current viewing angle When not all visible, it is judged that any of the ridge lines are invisible at the current viewing angle.
- the vertex determination subunit includes (not shown in FIG. 6): a projection point determination subunit, a hit point determination subunit, an approximate coincidence condition determination subunit, and a visibility determination subunit.
- the projection point determining subunit is configured to determine, by using a projection matrix of the current viewing angle, a projection point of the vertex at a projection plane corresponding to the current viewing angle;
- a hit point determining subunit for determining a hit point of the projection point in the solid figure by a hit test provided by the three-dimensional engine
- An approximate coincidence condition determining subunit configured to determine whether the hit point and the vertex satisfy a preset approximate coincidence condition
- a visibility determination subunit configured to determine that the vertex is visible at a current viewing angle when the determination result of the approximate coincidence condition determining subunit is YES, and when the judgment result of the approximate coincidence condition determining subunit is negative, It is determined that the vertex is invisible at the current viewing angle.
- the approximate coincidence condition determining subunit is specifically configured to:
- Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition by calculating a coordinate difference between the vertex and the hit point in the solid figure.
- the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
- the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. Those of ordinary skill in the art can understand and implement without any creative effort.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Architecture (AREA)
- Computer Graphics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides a solid figure display method, device and equipment. The solid figure consists of ridge lines. The method comprises: determining the visibility of each ridge line at the current view angle in real time along with the change of the display view angle of the solid figure; and displaying visible ridge lines and invisible ridge lines in a distinguished way at any one display view angle according to the visibility of each ridge line. With the method, device and equipment, the visibility of the ridge lines of the solid figure at the current view angle can be determined in real time according to the change of the display view angle, and the real-time display of the visible ridge lines and invisible ridge lines of the solid figure in the distinguished way at any one display view angle of a three-dimensional rotation operation is realized. The display of the solid figure is more intuitive, and the user experience is better.
Description
本申请涉及计算机技术领域,特别涉及立体图形显示的方法、装置及设备。The present application relates to the field of computer technology, and in particular, to a method, device and device for stereoscopic graphic display.
目前,在教学、绘图等场景中,往往会涉及立体图形轮廓的显示。在显示过程中,对于我们所能看到的立体图形的轮廓常常用实线显示,对于被立体图形遮挡的我们看不到的轮廓常常用虚线显示。At present, in the teaching, drawing and other scenes, the display of the outline of the three-dimensional graphics is often involved. During the display process, the outlines of the three-dimensional graphics that we can see are often displayed in solid lines, and the contours that we cannot see are obscured by the solid graphics are often shown by dashed lines.
现有技术中,通常以伪3D的方式来实现上述显示效果,即:在特定的视角下,以2D绘图的方式,手动绘制该视角下图形的轮廓。以图1所示的正方体为例,在左图中,当以特定角度俯视正方体的上表面ABCD时,棱线DH、EH、GH被正方体遮挡,此时用虚线绘制;在右图中,当以特定角度仰视正方体的下表面EFGH时,棱线DH、EH、GH被正方体遮挡,此时用虚线绘制。可见,现有技术只能以特定视角来区分显示立体图形的轮廓,无法实时变换不同视角下图形轮廓的可见性,用户体验较差。In the prior art, the above display effect is usually implemented in a pseudo 3D manner, that is, the outline of the graphic at the viewing angle is manually drawn in a 2D drawing manner under a specific viewing angle. Taking the cube shown in FIG. 1 as an example, in the left figure, when the upper surface ABCD of the cube is overlooked at a specific angle, the ridge lines DH, EH, and GH are blocked by the cube, and are drawn by a broken line at this time; in the right figure, when When the lower surface EFGH of the cube is looked up at a specific angle, the ridgelines DH, EH, and GH are blocked by the cube, and are drawn by a broken line at this time. It can be seen that the prior art can only distinguish the contours of the displayed stereoscopic graphics by a specific angle of view, and cannot change the visibility of the contours of the graphics at different viewing angles in real time, and the user experience is poor.
发明内容Summary of the invention
本发明实施例提供立体图形显示的方法、装置及设备,用于解决现有技术只能以特定视角显示立体图形的轮廓,用户体验较差的问题。The embodiment of the invention provides a method, a device and a device for displaying a three-dimensional graphic, which are used to solve the problem that the prior art can only display the contour of the three-dimensional graphic with a specific viewing angle, and the user experience is poor.
根据本发明实施例的第一方面,提供一种立体图形显示的方法,其特征在于,所述立体图形由棱线组成,所述方法包括:According to a first aspect of the embodiments of the present invention, a method for displaying a three-dimensional graphic is provided, wherein the three-dimensional graphic is composed of a ridge line, and the method includes:
在图形用户界面上显示所述立体图形;Displaying the stereoscopic graphic on a graphical user interface;
接收对所述立体图形的旋转操作指令;Receiving a rotation operation instruction for the stereoscopic graphic;
根据所述旋转操作指令变换所述立体图形显示的视角;Transforming a viewing angle of the stereoscopic graphic display according to the rotation operation instruction;
随所述立体图形显示视角的变化,实时判断每一棱线在当前视角的可见性;Corresponding to the change of the viewing angle of the stereoscopic graphic, the visibility of each ridge line at the current viewing angle is determined in real time;
根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。
According to the visibility of each ridgeline, the visible ridge line is displayed separately from the invisible ridge line.
根据本发明实施例的第二方面,提供一种立体图形显示的装置,其特征在于,所述立体图形由棱线组成,所述装置包括:According to a second aspect of the embodiments of the present invention, there is provided a device for displaying a three-dimensional graphic, wherein the three-dimensional graphic is composed of a ridge line, and the device comprises:
显示单元,用于在图形用户界面上显示所述立体图形;a display unit, configured to display the stereoscopic graphic on a graphical user interface;
接收单元,用于接收对所述立体图形的旋转操作指令;a receiving unit, configured to receive a rotation operation instruction for the stereo graphic;
变换单元,用于根据所述旋转操作指令变换所述立体图形显示的视角;a transforming unit, configured to transform a viewing angle of the stereoscopic graphic display according to the rotating operation instruction;
判断单元,用于随所述立体图形显示视角的变化,实时判断每一棱线在当前视角的可见性;a judging unit, configured to determine, in real time, the visibility of each ridge line at the current viewing angle according to the change of the viewing angle of the stereoscopic graphic display;
所述显示单元,还用于根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。The display unit is further configured to display the visible ridge line and the invisible ridge line separately according to the visibility of each of the ridge lines.
根据本发明实施例的第三方面,提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现以下步骤:According to a third aspect of the embodiments of the present invention, a computer apparatus includes a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when the processor executes the program Implement the following steps:
在图形用户界面上显示所述立体图形;Displaying the stereoscopic graphic on a graphical user interface;
接收对所述立体图形的旋转操作指令;Receiving a rotation operation instruction for the stereoscopic graphic;
根据所述旋转操作指令变换所述立体图形显示的视角;Transforming a viewing angle of the stereoscopic graphic display according to the rotation operation instruction;
随立体图形显示视角的变化,实时判断所述立体图形每一棱线在当前视角的可见性;The visibility of each ridgeline of the stereoscopic image at the current viewing angle is determined in real time as the viewing angle of the stereoscopic graphic changes;
根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。According to the visibility of each ridgeline, the visible ridge line is displayed separately from the invisible ridge line.
由以上技术方案可见,本发明实施例根据显示视角的变化,实时判断立体图形棱线在当前视角的可见性。实现了在三维旋转操作的任一显示视角中,对立体图形可见棱线与不可见棱线实时的区分显示,其对立体图形的显示更直观,用户体验较好。It can be seen from the above technical solutions that the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle. In any display viewing angle of the three-dimensional rotation operation, real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
图1为一正方体在特定视角的透视图;Figure 1 is a perspective view of a cube at a particular angle of view;
图2为本发明立体图形显示的方法的一个实施例流程图;2 is a flow chart of an embodiment of a method for displaying a three-dimensional graphic according to the present invention;
图3为本发明立体图形显示的方法的另一个实施例流程图;3 is a flow chart of another embodiment of a method for displaying a three-dimensional graphic according to the present invention;
图4为一正方体在特定视角的另一透视图;Figure 4 is another perspective view of a cube at a particular viewing angle;
图5为本发明立体图形显示的装置所在设备的一种硬件结构图;
FIG. 5 is a hardware structural diagram of a device where a device for stereoscopic graphic display is located; FIG.
图6为本发明立体图形显示的装置的一个实施例框图。Figure 6 is a block diagram of one embodiment of an apparatus for stereoscopic graphics display of the present invention.
为了使本技术领域的人员更好的理解本发明实施例中的技术方案,并使本发明实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本发明实施例中的技术方案作进一步详细的说明。The above-mentioned objects, features, and advantages of the embodiments of the present invention will become more apparent and understood, The program is explained in further detail.
参见图2,图2为本发明立体图形显示的方法的一个实施例流程图,所述立体图形由棱线组成,所述方法包括以下步骤:Referring to FIG. 2, FIG. 2 is a flowchart of an embodiment of a method for displaying a three-dimensional graphic according to the present invention. The three-dimensional graphic is composed of ridge lines, and the method includes the following steps:
步骤201:在图形用户界面上显示所述立体图形。Step 201: Display the stereoscopic graphic on a graphical user interface.
本步骤中,上述由棱线组成的立体图形可以是长方体、棱锥、棱台以及多面体。In this step, the above-mentioned three-dimensional figure composed of ridge lines may be a rectangular parallelepiped, a pyramid, a prism, and a polyhedron.
步骤202:接收对所述立体图形的旋转操作指令。Step 202: Receive a rotation operation instruction for the stereoscopic graphic.
步骤203:根据所述旋转操作指令变换所述立体图形显示的视角。Step 203: Transform a viewing angle of the stereoscopic graphic display according to the rotation operation instruction.
步骤204:随所述立体图形显示视角的变化,实时判断每一棱线在当前视角的可见性。Step 204: Determine the visibility of each ridge line at the current viewing angle in real time as the stereoscopic graphic displays the change of the viewing angle.
在一个可选的例子中,上述对每一棱线在当前视角可见性的判断可以通过对每一棱线两顶点在当前视角可见性判断来实现:如果上述任一棱线两顶点在当前视角均为可见,则判断上述任一棱线在当前视角为可见;如果上述任一棱线两顶点在当前视角不均为可见,则判断上述任一棱线在当前视角为不可见。In an optional example, the above determination of the visibility of each ridgeline at the current viewing angle can be achieved by judging the visibility of the two vertices of each ridge at the current perspective: if the vertices of any of the ridges are at the current viewing angle If all are visible, it is determined that any of the ridge lines are visible at the current viewing angle; if both vertices of any of the ridge lines are not visible at the current viewing angle, it is determined that any of the ridge lines are invisible at the current viewing angle.
其中,对上述顶点在当前视角可见性判断可以借助当前视角的投影矩阵以及三维引擎提供的命中测试来实现,具体的执行方式可以包括:通过当前视角的投影矩阵,确定上述顶点在当前视角所对应投影平面的投影点;通过三维引擎提供的命中测试,确定上述投影点在上述立体图形中的命中点;判断上述命中点与上述顶点是否满足预设的近似重合条件;如果是,则判断上述顶点在当前视角为可见,如果否,则判断上述顶点在当前视角为不可见。The vertices in the current view can be determined by the projection matrix of the current view and the hit test provided by the three-dimensional engine. The specific execution manner may include: determining, by using a projection matrix of the current view, the vertices corresponding to the current view. a projection point of the projection plane; determining a hit point of the projection point in the stereoscopic image by a hit test provided by the three-dimensional engine; determining whether the hit point and the vertex satisfy a preset approximate coincidence condition; if yes, determining the vertex The current view is visible, and if not, it is determined that the vertex is invisible at the current view.
其中,预设的近似重合条件可以是关于命中点与顶点在立体图形中距离的一个预设阈值,当命中点与顶点在立体图形中的距离小于这个预设阈值时则判定命中点与顶点近似重合;预设的近似重合条件也可以是关于命中点与顶点在立体图形中的三维坐标的预设误差,当命中点的三维坐标与顶点的三维坐标在任一维度的误差小于这个预设误差时则判定命中点与顶点近似重合。
The preset approximate coincidence condition may be a preset threshold value about the distance between the hit point and the vertex in the stereo graphic, and the hit point and the vertex are approximated when the distance between the hit point and the vertex in the stereo graphic is less than the preset threshold. Coincident; the preset approximate coincidence condition may also be a preset error about the three-dimensional coordinates of the hit point and the vertex in the solid figure, when the error of the three-dimensional coordinates of the hit point and the three-dimensional coordinates of the vertex in any dimension is less than the preset error Then it is determined that the hit point and the vertices approximately coincide.
步骤205:根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。Step 205: Display the visible ridge line and the invisible ridge line according to the visibility of each ridge line.
本步骤中,上述区分显示可以是:In this step, the above distinguishing display can be:
分别用实线和虚线对可见棱线与不可见棱线区分显示;Display the visible ridge line and the invisible ridge line by solid line and dashed line respectively;
或,分别用不同透明度对可见棱线与不可见棱线区分显示;Or, respectively, using different transparency to distinguish the visible ridge line from the invisible ridge line;
或,分别用不同灰度对可见棱线与不可见棱线区分显示,其中,上述灰度可以是同一颜色的不同灰度也可以是不同颜色的不同灰度;Or, respectively, displaying the visible ridge line and the invisible ridge line by using different gradations, wherein the gradation may be different gradations of the same color or different gradations of different colors;
或,分别用不同颜色对可见棱线与不可见棱线区分显示;Or, respectively, displaying the visible ridge line and the invisible ridge line in different colors;
或,分别用线条的不同粗细对可见棱线与不可见棱线区分显示。Or, the difference between the visible ridge line and the invisible ridge line is displayed by using the different thicknesses of the lines.
由以上技术方案可见,本发明实施例根据显示视角的变化,实时判断立体图形棱线在当前视角的可见性。实现了在三维旋转操作的任一显示视角中,对立体图形可见棱线与不可见棱线实时的区分显示,其对立体图形的显示更直观,用户体验较好。It can be seen from the above technical solutions that the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle. In any display viewing angle of the three-dimensional rotation operation, real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
参见图3,图3为本发明立体图形显示的方法的另一个实施例流程图,该实施例对立体图形的显示过程进行了详细说明,其中,该立体图形由棱线组成,所述方法包括以下步骤:Referring to FIG. 3, FIG. 3 is a flow chart of another embodiment of a method for displaying a three-dimensional graphic according to the present invention. The embodiment describes a display process of a three-dimensional graphic, wherein the three-dimensional graphic is composed of ridge lines, and the method includes The following steps:
步骤301:在图形用户界面上显示该立体图形,接收对该立体图形的旋转操作指令并按上述指令变换上述立体图形的显示视角。Step 301: Display the stereoscopic graphic on the graphical user interface, receive a rotation operation instruction for the stereoscopic graphic, and transform the display viewing angle of the stereoscopic graphic according to the above instruction.
本步骤中,上述由棱线组成的立体图形可以是长方体、棱锥、棱台以及多面体。In this step, the above-mentioned three-dimensional figure composed of ridge lines may be a rectangular parallelepiped, a pyramid, a prism, and a polyhedron.
步骤302:随立体图形显示视角的变化,通过当前视角的投影矩阵,实时确定上述棱线顶点在当前视角所对应投影平面的投影点。Step 302: The projection point of the vertices at the projection plane corresponding to the current perspective is determined in real time by the projection matrix of the current perspective.
步骤303:通过三维引擎提供的命中测试,实时确定上述投影点在上述立体图形中的命中点。Step 303: Determine, by a hit test provided by the three-dimensional engine, a hit point of the projection point in the stereoscopic graphic in real time.
下面,通过图4来介绍本步骤302和步骤303中投影平面,投影点,以及命中点的概念。图4中,点H是所示正方体8个顶点中的一个顶点,按图中所示显示视角,此时H点为不可见点。点H’为所示立方体ABEF平面上的一个点。如果将所示的正方体图像看做一个在当前视角的透视图,点H’在当前视角将遮挡点H,其中,上述透视图所在的二维平面即为上述投影平面,点H在该透视图(投影平面)的投影即为点H的投影点,点H’即为点H的投影点的命中点。Next, the concept of the projection plane, the projection point, and the hit point in this step 302 and step 303 will be described with reference to FIG. In Fig. 4, point H is one of the eight vertices of the illustrated cube, and the angle of view is displayed as shown in the figure, at which point H is an invisible point. Point H' is a point on the ABEF plane of the cube shown. If the illustrated cube image is viewed as a perspective view of the current perspective, point H' will occlude point H at the current perspective, where the two-dimensional plane in which the perspective is located is the projection plane, point H in the perspective The projection of the (projection plane) is the projection point of the point H, and the point H' is the hit point of the projection point of the point H.
步骤304:实时计算上述顶点与上述命中点在立体图形中的距离是否小于预设距离阈值,
如果是,则执行步骤305,如果否,则执行步骤306。Step 304: Calculate in real time whether the distance between the vertex and the hit point in the stereo graphic is less than a preset distance threshold.
If yes, go to step 305, if no, go to step 306.
本步骤中,上述预设距离阈值可以是固定值;也可以是随立体图形大小变化而变化的一个动态值,具体的,可以将预设距离阈值确定为一个相对于立体图形的比例。需要指出的是,上述距离阈值决定了顶点可见性判断的精度,为保证判断精度,这个距离阈值应尽量小,一个通常的值为1个像素点。In this step, the preset distance threshold may be a fixed value; or may be a dynamic value that changes according to the size of the stereo graphic. Specifically, the preset distance threshold may be determined as a ratio with respect to the stereo graphic. It should be noted that the above distance threshold determines the accuracy of the vertex visibility judgment. To ensure the judgment accuracy, the distance threshold should be as small as possible, and a normal value is 1 pixel.
步骤305:判定上述顶点在当前视角为可见。Step 305: It is determined that the above vertices are visible at the current viewing angle.
步骤306:判定上述顶点在当前视角为不可见。Step 306: It is determined that the above vertex is invisible at the current viewing angle.
步骤307:判断任一棱线两顶点在当前视角是否均为可见,如果是则执行步骤307,如果否则执行步骤308。Step 307: Determine whether both vertices of any ridge are visible in the current view, if yes, go to step 307, if otherwise, go to step 308.
步骤308:判定上述任一棱线在当前视角为可见。Step 308: It is determined that any of the above ridgelines are visible at the current viewing angle.
步骤309:判定上述任一棱线在当前视角为不可见。Step 309: It is determined that any of the above ridge lines are invisible at the current viewing angle.
步骤310:分别用实线和虚线对可见棱线与不可见棱线区分显示。Step 310: Display the visible ridge line and the invisible ridge line separately by using a solid line and a broken line.
在一个可选方式中,上述区分显示可以是:In an alternative manner, the above distinguishing display can be:
分别用实线和虚线对可见棱线与不可见棱线区分显示;Display the visible ridge line and the invisible ridge line by solid line and dashed line respectively;
或,分别用不同透明度对可见棱线与不可见棱线区分显示;Or, respectively, using different transparency to distinguish the visible ridge line from the invisible ridge line;
或,分别用不同灰度对可见棱线与不可见棱线区分显示,其中,上述灰度可以是同一颜色的不同灰度也可以是不同颜色的不同灰度;Or, respectively, displaying the visible ridge line and the invisible ridge line by using different gradations, wherein the gradation may be different gradations of the same color or different gradations of different colors;
或,分别用不同颜色对可见棱线与不可见棱线区分显示;Or, respectively, displaying the visible ridge line and the invisible ridge line in different colors;
或,分别用线条的不同粗细对可见棱线与不可见棱线区分显示。Or, the difference between the visible ridge line and the invisible ridge line is displayed by using the different thicknesses of the lines.
在另一个可选的例子中,除了分别用实线和虚线对可见棱线与不可见棱线区分显示,当用户点击立体图形的任一表面时,还可以通过命中测试实现对用户点击的表面的判断,同时对用户点击的表面与立体图形的其它表面进行区分显示,以图4为例,具体可以包括以下步骤:In another optional example, in addition to displaying the visible ridge line and the invisible ridge line separately by the solid line and the dotted line, when the user clicks on any surface of the solid figure, the surface clicked on the user can also be achieved through the hit test. The judgment of the user clicks on the surface of the user and the other surfaces of the three-dimensional graphic. For example, as shown in FIG. 4, the following steps may be specifically included:
接收对图4所示立方体的点击操作指令;Receiving a click operation instruction on the cube shown in FIG. 4;
通过三维引擎提供的命中测试,确定所述点击操作指令的点击点在所示立方体中的点击命中点为H’;Determining, by a hit test provided by the three-dimensional engine, that the click point of the click operation instruction has a hit hit point in the cube shown as H';
在所示立方体的中,判断所述点击命中点H’所在的目标面为ABFE;
In the illustrated cube, it is determined that the target surface where the click hit point H' is located is ABFE;
将所述目标面ABFE进行着色显示。The target surface ABFE is colored and displayed.
由以上技术方案可见,本发明实施例根据显示视角的变化,实时判断立体图形棱线在当前视角的可见性。实现了在三维旋转操作的任一显示视角中,对立体图形可见棱线与不可见棱线实时的区分显示,其对立体图形的显示更直观,用户体验较好。It can be seen from the above technical solutions that the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle. In any display viewing angle of the three-dimensional rotation operation, real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
下面通过一个具体的应用实例对本发明实施例进行说明,该应用实例结合图4示出的正方体进行描述,其中,假设所示正方体可沿任意方向移动或任意轴旋转,需要实时用实线显示其可见轮廓,用虚线显示其不可见轮廓。显示过程如下:The embodiments of the present invention are described below with reference to a specific application example. The application example is described in conjunction with the cube shown in FIG. 4, wherein it is assumed that the illustrated cube can be moved in any direction or rotated in any axis, and it is required to display the line in real time in real time. The outline is visible and its invisible outline is shown with a dashed line. The display process is as follows:
在图形用户界面上显示所示正方体,接收对所示正方体的操作指令并按上述指令变换所示正方体的显示视角;Displaying the illustrated cube on the graphical user interface, receiving an operation instruction for the illustrated cube and transforming the display angle of the illustrated cube according to the above instruction;
随所述立体图形显示视角的变化,通过当前视角的投影矩阵M,实时确定所示正方体8个顶点在当前视角所对应投影平面的投影点,以图4所示视角以及顶点H为例,其投影点可表示为H*M;According to the change of the viewing angle of the stereoscopic graphic, the projection point M of the current viewing angle is used to determine the projection point of the 8 vertices of the illustrated square at the projection plane corresponding to the current viewing angle, taking the viewing angle and the vertex H shown in FIG. 4 as an example. The projection point can be expressed as H*M;
通过三维引擎(WPF Media3D)提供的命中测试,实时确定所示正方体8个顶点在当前视角投影点的命中点,以图4所示视角以及投影点H*M为例,通过命中测试,投影点H*M在所述立体图形中的三维命中点为H’;Through the hit test provided by the 3D engine (WPF Media3D), the hit points of the 8 vertices of the illustrated cube at the current perspective projection point are determined in real time, taking the angle of view shown in FIG. 4 and the projection point H*M as an example, through the hit test, the projection point The three-dimensional hit point of H*M in the solid figure is H';
实时、分别计算所示正方体8个顶点与其对应命中点在所述立体图形中的像素距离是否小于1个像素点,若是则判定所述顶点在当前视角为不可见,若否则判定所述顶点在当前视角为可见,以图4所示视角以及顶点H为例,计算HH’的长度,因为HH’的像素距离大于1个像素点,所以判定点H为不可见点;Real-time, separately calculating whether the pixel distances of the 8 vertices of the illustrated cube and their corresponding hit points in the stereoscopic image are less than 1 pixel point, and if so, determining that the vertex is invisible at the current viewing angle, if otherwise determining that the vertex is The current viewing angle is visible. Taking the viewing angle and the vertex H shown in FIG. 4 as an example, the length of the HH′ is calculated. Since the pixel distance of the HH′ is greater than 1 pixel, the determination point H is an invisible point;
遍历所示正方体12条棱线,对任一棱线,判断其两顶点在当前视角是否均为可见,如果是则判定该任一棱线为可见,如果否则判定该任一棱线为不可见,以图4所示视角为例,根据所示正方体8个顶点的可见性判断得出棱线AB、AD、AE、CD、CB、CG、FB、FE、FG为可见棱线,棱线HD、HE、HG为不可见棱线;Traversing the 12 ridges of the square shown, for any ridge, judging whether both vertices are visible at the current viewing angle, and if so, determining that any ridge is visible, otherwise if it is determined that the ridge is invisible Taking the angle of view shown in Figure 4 as an example, the ridge lines AB, AD, AE, CD, CB, CG, FB, FE, FG are visible ridges and ridges HD according to the visibility of the eight vertices of the square. , HE, HG are invisible ridge lines;
随所述立体图形显示视角的变化,分别用实线和虚线对可见棱线与不可见棱线实时、区分显示,以图4所示视角为例,棱线AB、AD、AE、CD、CB、CG、FB、FE、FG以实线显示,棱线HD、HE、HG以虚线显示。According to the change of the viewing angle of the stereoscopic graphic, the visible ridge line and the invisible ridge line are displayed in real time and in different directions by the solid line and the broken line respectively, and the angle of view shown in FIG. 4 is taken as an example, and the ridge line AB, AD, AE, CD, CB CG, FB, FE, and FG are displayed in solid lines, and ridge lines HD, HE, and HG are displayed in broken lines.
与前述立体图形显示的方法的实施例相对应,本申请还提供了立体图形显示的装置的实施例。
Corresponding to the embodiment of the method of stereoscopic graphic display described above, the present application also provides an embodiment of a device for stereoscopic graphic display.
本申请立体图形显示的装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图5所示,为本申请立体图形显示的装置所在设备的一种硬件结构图,除了图5所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的设备通常根据该设备的实际功能,还可以包括其他硬件,对此不再赘述。The device embodiment of the three-dimensional graphic display of the present application may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking the software implementation as an example, as a logical means, the processor of the device in which it is located reads the corresponding computer program instructions in the non-volatile memory into the memory. From a hardware level, as shown in FIG. 5, a hardware structure diagram of a device in which the device for stereoscopic graphic display is located, except for the processor, the memory, the network interface, and the non-volatile memory shown in FIG. In addition, the device in which the device is located in the embodiment may also include other hardware according to the actual function of the device, and details are not described herein again.
请参考图6,为本发明立体图形显示的装置的一个实施例框图,所述立体图形由棱线组成,所述装置包括:显示单元610,接收单元620,变换单元630,判断单元640。Please refer to FIG. 6 , which is a block diagram of an embodiment of a device for stereoscopic graphics display. The stereoscopic graphics are composed of ridge lines. The device includes: a display unit 610, a receiving unit 620, a transform unit 630, and a determining unit 640.
显示单元610,用于在图形用户界面上显示所述立体图形;a display unit 610, configured to display the stereoscopic graphic on a graphical user interface;
接收单元620,用于接收对所述立体图形的旋转操作指令;The receiving unit 620 is configured to receive a rotation operation instruction for the stereo graphic.
变换单元630,用于根据所述旋转操作指令变换所述立体图形显示的视角;a transforming unit 630, configured to transform a viewing angle of the stereoscopic graphic display according to the rotating operation instruction;
判断单元640,用于随所述立体图形显示视角的变化,实时判断每一棱线在当前视角的可见性;The determining unit 640 is configured to determine, in real time, the visibility of each ridge line at the current viewing angle according to the change of the viewing angle of the stereoscopic graphic display;
所述显示单元610,还用于根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。The display unit 610 is further configured to display the visible ridge line and the invisible ridge line separately according to the visibility of each ridge line.
由以上技术方案可见,本发明实施例根据显示视角的变化,实时判断立体图形棱线在当前视角的可见性。实现了在三维旋转操作的任一显示视角中,对立体图形可见棱线与不可见棱线实时的区分显示,其对立体图形的显示更直观,用户体验较好。It can be seen from the above technical solutions that the embodiment of the present invention determines the visibility of the vertices of the stereoscopic graphics in the current viewing angle in real time according to the change of the display viewing angle. In any display viewing angle of the three-dimensional rotation operation, real-time distinguishing display of the visible ridge line and the invisible ridge line of the three-dimensional figure is realized, and the display of the three-dimensional figure is more intuitive and the user experience is better.
在一个可选的例子中,所述判断单元640包括(图6中未示出):顶点确定子单元,棱线判断子单元。In an optional example, the determining unit 640 includes (not shown in FIG. 6): a vertex determining subunit, and an ridge line judging subunit.
顶点确定子单元,用于确定任一棱线的顶点在当前视角的可见性;a vertex determining sub-unit for determining the visibility of the vertices of any of the ridges at the current perspective;
棱线判断子单元,用于当所述任一棱线两顶点在当前视角均为可见时,判断所述任一棱线在当前视角为可见,当所述任一棱线两顶点在当前视角不均为可见时,判断所述任一棱线在当前视角为不可见。a ridge line judging subunit, configured to determine that any of the vertices are visible at a current viewing angle when both vertices of the ridge line are visible at a current viewing angle, when the two vertices of the ridge line are at a current viewing angle When not all visible, it is judged that any of the ridge lines are invisible at the current viewing angle.
在另一个可选的例子中,所述顶点确定子单元包括(图6中未示出):投影点确定子单元,命中点确定子单元,近似重合条件判断子单元,可见性判定子单元。In another optional example, the vertex determination subunit includes (not shown in FIG. 6): a projection point determination subunit, a hit point determination subunit, an approximate coincidence condition determination subunit, and a visibility determination subunit.
其中,投影点确定子单元,用于通过当前视角的投影矩阵,确定所述顶点在当前视角所对应投影平面的投影点;
The projection point determining subunit is configured to determine, by using a projection matrix of the current viewing angle, a projection point of the vertex at a projection plane corresponding to the current viewing angle;
命中点确定子单元,用于通过三维引擎提供的命中测试,确定所述投影点在所述立体图形中的命中点;a hit point determining subunit for determining a hit point of the projection point in the solid figure by a hit test provided by the three-dimensional engine;
近似重合条件判断子单元,用于判断所述命中点与所述顶点是否满足预设的近似重合条件;An approximate coincidence condition determining subunit, configured to determine whether the hit point and the vertex satisfy a preset approximate coincidence condition;
可见性判定子单元,用于当所述近似重合条件判断子单元的判断结果为是时,判定所述顶点在当前视角为可见,当所述近似重合条件判断子单元的判断结果为否时,判定所述顶点在当前视角为不可见。a visibility determination subunit, configured to determine that the vertex is visible at a current viewing angle when the determination result of the approximate coincidence condition determining subunit is YES, and when the judgment result of the approximate coincidence condition determining subunit is negative, It is determined that the vertex is invisible at the current viewing angle.
在另一个可选的例子中,所述近似重合条件判断子单元,具体用于:In another optional example, the approximate coincidence condition determining subunit is specifically configured to:
通过计算所述顶点与所述命中点在所述立体图形中的距离,判断所述命中点与所述顶点是否满足预设的近似重合条件;Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition by calculating a distance between the vertex and the hit point in the solid figure;
或,or,
通过计算所述顶点与所述命中点在所述立体图形中的坐标差,判断所述命中点与所述顶点是否满足预设的近似重合条件。Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition by calculating a coordinate difference between the vertex and the hit point in the solid figure.
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。The implementation process of the function and the function of each unit in the foregoing device is specifically described in the implementation process of the corresponding steps in the foregoing method, and details are not described herein again.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. Those of ordinary skill in the art can understand and implement without any creative effort.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。
The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.
Claims (11)
- 一种立体图形显示的方法,其特征在于,所述立体图形由棱线组成,所述方法包括:A method for displaying a three-dimensional graphic, wherein the three-dimensional graphic is composed of ridge lines, and the method includes:在图形用户界面上显示所述立体图形;Displaying the stereoscopic graphic on a graphical user interface;接收对所述立体图形的旋转操作指令;Receiving a rotation operation instruction for the stereoscopic graphic;根据所述旋转操作指令变换所述立体图形显示的视角;Transforming a viewing angle of the stereoscopic graphic display according to the rotation operation instruction;随所述立体图形显示视角的变化,实时判断每一棱线在当前视角的可见性;Corresponding to the change of the viewing angle of the stereoscopic graphic, the visibility of each ridge line at the current viewing angle is determined in real time;根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。According to the visibility of each ridgeline, the visible ridge line is displayed separately from the invisible ridge line.
- 根据权利要求1所述的方法,其特征在于,所述判断每一棱线在当前视角的可见性,包括:The method of claim 1 wherein said determining the visibility of each ridgeline at a current viewing angle comprises:针对任一棱线:For any ridgeline:确定所述任一棱线的顶点在当前视角的可见性;Determining the visibility of the vertices of any of the ridges at the current perspective;如果所述任一棱线两顶点在当前视角均为可见,则判断所述任一棱线在当前视角为可见;If both vertices of the ridge line are visible at the current viewing angle, it is determined that the ridge line is visible at the current viewing angle;如果所述任一棱线两顶点在当前视角不均为可见,则判断所述任一棱线在当前视角为不可见。If both vertices of any of the ridges are not visible at the current viewing angle, it is determined that the ridgeline is invisible at the current viewing angle.
- 根据权利要求2所述的方法,其特征在于,所述确定所述任一棱线的顶点在当前视角的可见性,包括:The method of claim 2, wherein the determining the visibility of the vertices of the any ridgeline at the current viewing angle comprises:通过当前视角的投影矩阵,确定所述顶点在当前视角所对应投影平面的投影点;Determining, by the projection matrix of the current perspective, a projection point of the vertex at a projection plane corresponding to the current perspective;通过三维引擎提供的命中测试,确定所述投影点在所述立体图形中的命中点;Determining a hit point of the projection point in the solid figure by a hit test provided by the three-dimensional engine;判断所述命中点与所述顶点是否满足预设的近似重合条件;Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition;如果是,则判断所述顶点在当前视角为可见,如果否,则判断所述顶点在当前视角为不可见。If so, it is determined that the vertex is visible at the current perspective, and if not, it is determined that the vertex is invisible at the current perspective.
- 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:接收对所述立体图形的点击操作指令;Receiving a click operation instruction on the stereoscopic graphic;通过三维引擎提供的命中测试,确定所述点击操作指令的点击点在所述立体图形中的点击命中点;Determining, by a hit test provided by the three-dimensional engine, a click hit point of the click point of the click operation instruction in the stereo graphic;在所述立体图形中,判断所述点击命中点所在的目标面;Determining, in the stereoscopic graphic, a target surface on which the hit hit point is located;将所述目标面与所述立体图形的其它表面区分显示。The target surface is displayed separately from other surfaces of the solid figure.
- 根据权利要求3所述的方法,其特征在于,所述判断所述命中点与所述顶点是否满足预设的近似重合条件,包括:The method according to claim 3, wherein the determining whether the hit point and the vertex satisfy a preset approximate coincidence condition comprises:通过计算所述顶点与所述命中点在所述立体图形中的距离,判断所述命中点与所述顶点是否满足预设的近似重合条件; Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition by calculating a distance between the vertex and the hit point in the solid figure;或,or,通过计算所述顶点与所述命中点在所述立体图形中的坐标差,判断所述命中点与所述顶点是否满足预设的近似重合条件。Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition by calculating a coordinate difference between the vertex and the hit point in the solid figure.
- 根据权利要求1所述的方法,其特征在于,所述将可见棱线与不可见棱线区分显示,包括:The method of claim 1 wherein said distinguishing visible ridge lines from invisible ridge lines comprises:分别用实线和虚线对可见棱线与不可见棱线区分显示;Display the visible ridge line and the invisible ridge line by solid line and dashed line respectively;或,or,分别用不同透明度对可见棱线与不可见棱线区分显示;Displaying the visible ridge line and the invisible ridge line separately with different transparency;或,or,分别用不同灰度对可见棱线与不可见棱线区分显示。The visible ridge lines and the invisible ridge lines are displayed separately by using different gradations.
- 一种立体图形显示的装置,其特征在于,所述立体图形由棱线组成,所述装置包括:A device for displaying a three-dimensional graphic, wherein the three-dimensional graphic is composed of ridge lines, and the device comprises:显示单元,用于在图形用户界面上显示所述立体图形;a display unit, configured to display the stereoscopic graphic on a graphical user interface;接收单元,用于接收对所述立体图形的旋转操作指令;a receiving unit, configured to receive a rotation operation instruction for the stereo graphic;变换单元,用于根据所述旋转操作指令变换所述立体图形显示的视角;a transforming unit, configured to transform a viewing angle of the stereoscopic graphic display according to the rotating operation instruction;判断单元,用于随所述立体图形显示视角的变化,实时判断每一棱线在当前视角的可见性;a judging unit, configured to determine, in real time, the visibility of each ridge line at the current viewing angle according to the change of the viewing angle of the stereoscopic graphic display;所述显示单元,还用于根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。The display unit is further configured to display the visible ridge line and the invisible ridge line separately according to the visibility of each of the ridge lines.
- 根据权利要求7所述的装置,其特征在于,所述判断单元,包括:The device according to claim 7, wherein the determining unit comprises:顶点确定子单元,用于确定任一棱线的顶点在当前视角的可见性;a vertex determining sub-unit for determining the visibility of the vertices of any of the ridges at the current perspective;棱线判断子单元,用于当所述任一棱线两顶点在当前视角均为可见时,判断所述任一棱线在当前视角为可见,当所述任一棱线两顶点在当前视角不均为可见时,判断所述任一棱线在当前视角为不可见。a ridge line judging subunit, configured to determine that any of the vertices are visible at a current viewing angle when both vertices of the ridge line are visible at a current viewing angle, when the two vertices of the ridge line are at a current viewing angle When not all visible, it is judged that any of the ridge lines are invisible at the current viewing angle.
- 根据权利要求8所述的装置,其特征在于,所述顶点确定子单元,包括:The apparatus according to claim 8, wherein the vertex determining subunit comprises:投影点确定子单元,用于通过当前视角的投影矩阵,确定所述顶点在当前视角所对应投影平面的投影点;a projection point determining subunit, configured to determine, by the projection matrix of the current viewing angle, a projection point of the vertex at a projection plane corresponding to the current viewing angle;命中点确定子单元,用于通过三维引擎提供的命中测试,确定所述投影点在所述立体图形中的命中点;a hit point determining subunit for determining a hit point of the projection point in the solid figure by a hit test provided by the three-dimensional engine;近似重合条件判断子单元,用于判断所述命中点与所述顶点是否满足预设的近似重合条件;An approximate coincidence condition determining subunit, configured to determine whether the hit point and the vertex satisfy a preset approximate coincidence condition;可见性判定子单元,用于当所述近似重合条件判断子单元的判断结果为是时,判定所述顶点在当前视角为可见,当所述近似重合条件判断子单元的判断结果为否时,判定所述顶点 在当前视角为不可见。a visibility determination subunit, configured to determine that the vertex is visible at a current viewing angle when the determination result of the approximate coincidence condition determining subunit is YES, and when the judgment result of the approximate coincidence condition determining subunit is negative, Determining the vertex The current perspective is not visible.
- 根据权利要求9所述的装置,其特征在于,所述近似重合条件判断子单元,具体用于:The apparatus according to claim 9, wherein said approximate coincidence condition determining subunit is specifically configured to:通过计算所述顶点与所述命中点在所述立体图形中的距离,判断所述命中点与所述顶点是否满足预设的近似重合条件;Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition by calculating a distance between the vertex and the hit point in the solid figure;或,or,通过计算所述顶点与所述命中点在所述立体图形中的坐标差,判断所述命中点与所述顶点是否满足预设的近似重合条件。Determining whether the hit point and the vertex satisfy a preset approximate coincidence condition by calculating a coordinate difference between the vertex and the hit point in the solid figure.
- 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现以下步骤:A computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor performs the following steps when executing the program:在图形用户界面上显示所述立体图形;Displaying the stereoscopic graphic on a graphical user interface;接收对所述立体图形的旋转操作指令;Receiving a rotation operation instruction for the stereoscopic graphic;根据所述旋转操作指令变换所述立体图形显示的视角;Transforming a viewing angle of the stereoscopic graphic display according to the rotation operation instruction;随立体图形显示视角的变化,实时判断所述立体图形每一棱线在当前视角的可见性;The visibility of each ridgeline of the stereoscopic image at the current viewing angle is determined in real time as the viewing angle of the stereoscopic graphic changes;根据所述每一棱线的可见性,将可见棱线与不可见棱线区分显示。 According to the visibility of each ridgeline, the visible ridge line is displayed separately from the invisible ridge line.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710309315.8A CN107422952B (en) | 2017-05-04 | 2017-05-04 | Method, device and equipment for displaying three-dimensional graph |
CN201710309315.8 | 2017-05-04 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018201663A1 true WO2018201663A1 (en) | 2018-11-08 |
Family
ID=60425794
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/104369 WO2018201663A1 (en) | 2017-05-04 | 2017-09-29 | Solid figure display method, device and equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107422952B (en) |
WO (1) | WO2018201663A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108053492B (en) * | 2017-12-19 | 2020-09-22 | 广州视源电子科技股份有限公司 | Method, device and equipment for presenting expansion process of three-dimensional graph and storage medium |
CN113345081A (en) * | 2021-06-24 | 2021-09-03 | 广东三维家信息科技有限公司 | Stereo model shielding elimination method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241604A (en) * | 2008-03-05 | 2008-08-13 | 钟磊 | Three-dimension graphic stereo display method |
CN102044089A (en) * | 2010-09-20 | 2011-05-04 | 董福田 | Method for carrying out self-adaption simplification, gradual transmission and rapid charting on three-dimensional model |
CN102117500A (en) * | 2009-12-30 | 2011-07-06 | 新奥特(北京)视频技术有限公司 | Three-dimensional modeling method and system |
CN102147926A (en) * | 2011-01-17 | 2011-08-10 | 中兴通讯股份有限公司 | Three-dimensional (3D) icon processing method and device and mobile terminal |
CN104715452A (en) * | 2013-12-12 | 2015-06-17 | 鸿合科技有限公司 | Regular prism plane display method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012147303A1 (en) * | 2011-04-25 | 2012-11-01 | Hayashi Mitsuo | Omnidirectional image editing program and omnidirectional image editing device |
-
2017
- 2017-05-04 CN CN201710309315.8A patent/CN107422952B/en active Active
- 2017-09-29 WO PCT/CN2017/104369 patent/WO2018201663A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241604A (en) * | 2008-03-05 | 2008-08-13 | 钟磊 | Three-dimension graphic stereo display method |
CN102117500A (en) * | 2009-12-30 | 2011-07-06 | 新奥特(北京)视频技术有限公司 | Three-dimensional modeling method and system |
CN102044089A (en) * | 2010-09-20 | 2011-05-04 | 董福田 | Method for carrying out self-adaption simplification, gradual transmission and rapid charting on three-dimensional model |
CN102147926A (en) * | 2011-01-17 | 2011-08-10 | 中兴通讯股份有限公司 | Three-dimensional (3D) icon processing method and device and mobile terminal |
CN104715452A (en) * | 2013-12-12 | 2015-06-17 | 鸿合科技有限公司 | Regular prism plane display method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107422952B (en) | 2019-04-09 |
CN107422952A (en) | 2017-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9886102B2 (en) | Three dimensional display system and use | |
WO2017092303A1 (en) | Virtual reality scenario model establishing method and device | |
US7348989B2 (en) | Preparing digital images for display utilizing view-dependent texturing | |
US8223145B2 (en) | Method and system for 3D object positioning in 3D virtual environments | |
WO2018188479A1 (en) | Augmented-reality-based navigation method and apparatus | |
CN110926334B (en) | Measuring method, measuring device, electronic device and storage medium | |
JP5295416B1 (en) | Image processing apparatus, image processing method, and image processing program | |
WO2018201664A1 (en) | Stereoscopic graphic display method, apparatus and equipment | |
US11562545B2 (en) | Method and device for providing augmented reality, and computer program | |
US10460500B1 (en) | Glyph rendering in three-dimensional space | |
CN114863014B (en) | Fusion display method and device for three-dimensional model | |
CN111145341A (en) | Single light source-based virtual-real fusion illumination consistency drawing method | |
KR20110088995A (en) | Method and system to visualize surveillance camera videos within 3d models, and program recording medium | |
WO2018201663A1 (en) | Solid figure display method, device and equipment | |
CN114663632A (en) | Method and equipment for displaying virtual object by illumination based on spatial position | |
AU2020215351A1 (en) | Viewability metrics of a multidimensional object in a multidimensional digital environment | |
CN115761123B (en) | Three-dimensional model processing method, three-dimensional model processing device, electronic equipment and storage medium | |
US11756267B2 (en) | Method and apparatus for generating guidance among viewpoints in a scene | |
WO2022089061A1 (en) | Object annotation information presentation method and apparatus, and electronic device and storage medium | |
CN113096254B (en) | Target rendering method and device, computer equipment and medium | |
JP2007512603A (en) | Image drawing | |
CN110197524B (en) | Stereoscopic display method, apparatus, device, and computer-readable storage medium | |
US11741663B2 (en) | Multidimensional object view ability data generation | |
WO2023197689A1 (en) | Data processing method, system, and device | |
Comninos | Viewing and Projection Transformations |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17908445 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14.07.2020) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17908445 Country of ref document: EP Kind code of ref document: A1 |