Human-computer interaction method, device and equipment based on aircraft unstructured grid and storage medium
By employing a top-down recursive partitioning and bounding box construction method, the human-computer interaction process of unstructured meshes for aircraft was optimized, solving the problem of low efficiency in existing technologies, achieving efficient capture of interactive objects and data refresh, and improving the user experience.
Patent Information
- Application Number
- CN202511500923.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-21
AI Technical Summary
Existing technologies are inefficient in human-computer interaction based on unstructured meshes of aircraft, especially when the data volume reaches tens of millions or even hundreds of millions, failing to meet the requirements for efficient capture and data refresh. Furthermore, the interaction technology is limited by the differences in computer graphics card configurations.
A top-down recursive partitioning method is used to construct directed bounding boxes. The unstructured mesh is recursively partitioned into a preset number of sub-bounding boxes, which are then bound to the root node to generate a spatial partitioning structure. Intersection detection and data storage are performed, and the capture process of interactive objects is optimized by combining capture state flags and collision detection.
It improves the efficiency of human-computer interaction in unstructured grids, enhances the user experience, and enables efficient capture of interactive objects and data refresh in scenarios with large amounts of data.
Smart Images

Figure CN120973241A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of fluid mechanics, in particular to a man-machine interaction method and device based on aircraft unstructured grid, equipment and storage medium. BACKGROUND
[0002] At present, the research of three-dimensional space index technology mainly focuses on octree, three-dimensional R-tree and the like. In addition, there is a laser point cloud data management method integrating octree and three-dimensional R-tree in the prior art, but the above algorithm has certain requirements for application scenarios, that is, it is not applicable to grid model data with various model forms for uniformly distributed point cloud data.
[0003] In addition, the octree algorithm has certain limitations. For non-uniform data, the intermediate nodes of the octree need to continue to divide the octree according to the convergence condition until the condition converges, and the index time is affected by the tree hierarchy structure. When the method is applied to the OpenGL picking operation, the grid object capture time is greatly affected by the tree structure, and the effect is not ideal. Furthermore, the prior art proposes a LOD_OR tree spatial index structure in three-dimensional GIS. The algorithm integrates octree and R-tree, that is, the index idea of octree is applied to R-tree to limit the space, but when the algorithm is applied to the OpenGL picking operation, the capture time is still greatly affected by the tree hierarchy structure, and the capture time is uncontrollable. That is, the above improved algorithm has good effect in the specified application scenario, but for the application scenario of real-time interaction of interactive objects reaching the level of millions of data
[0004] That is, the above technology has the following problems:
[0005] 1. The user's computer graphics card configuration is uneven, and the interaction technology is limited;
[0006] 2. For human-computer interaction software with data reaching the level of tens of millions or even hundreds of millions, especially in the field of CFD, the difference between the field size and the surface size is large, and the existing technology cannot achieve efficient capture picking;
[0007] 3. For human-computer interaction software, especially human-computer interaction software with data reaching the level of tens of millions or even hundreds of millions in the field of CFD, data refresh is crucial, and the above technology cannot meet the data refresh requirements of large data volume.
[0008] From the above, how to improve the efficiency of man-machine interaction based on aircraft unstructured grid in the process of man-machine interaction based on aircraft unstructured grid is a problem to be solved at present. SUMMARY
[0009] Therefore, the present application aims to provide an aircraft unstructured grid-based human-computer interaction method, device, equipment and storage medium, which can improve the efficiency of human-computer interaction based on aircraft unstructured grid in the process of human-computer interaction based on aircraft unstructured grid. The specific scheme is as follows:
[0010] In the first aspect, the present application provides an aircraft unstructured grid-based human-computer interaction method, comprising:
[0011] The current oriented bounding box is constructed based on the aircraft unstructured grid to be processed, and the current oriented bounding box is set as a current root node. Then, the current oriented bounding box is evenly divided into a preset number of sub bounding boxes at the current level by using a top-down recursive division method starting from the current root node, and each sub bounding box is bound to a child node of the current root node to obtain a current spatial partition structure.
[0012] It is judged whether the current level is less than a preset level threshold. If it is less than, the current level is updated, and each sub bounding box is set as a new current oriented bounding box. Then, the step of setting the current oriented bounding box as the current root node is re-jumped until the current level is not less than the preset level threshold, and the current spatial partition structure is set as a target spatial partition structure.
[0013] An interactive object grid set is generated based on a model file of the unstructured grid to be processed, and a minimum bounding box corresponding to each interactive object in the interactive object grid set is determined. Then, the minimum bounding boxes are sequentially intersected with each node in the target spatial partition structure in order of level from small to large to determine a bottom leaf node intersected with the minimum bounding box, and data of the interactive object is stored in the corresponding bottom leaf node.
[0014] It is judged whether the interactive object data is stored in each bottom leaf node, and a capture state identifier is set based on the judgment result. Then, collision detection is performed on the bounding box corresponding to each bottom leaf node with the capture state identifier set in the interactive range corresponding to the interactive instruction to obtain a target interactive object.
[0015] Optionally, the current oriented bounding box is constructed based on the aircraft unstructured grid to be processed, and the current oriented bounding box is set as a current root node. Then, the current oriented bounding box is evenly divided into a preset number of sub bounding boxes at the current level by using a top-down recursive division method starting from the current root node, and each sub bounding box is bound to a child node of the current root node to obtain a current spatial partition structure, comprising:
[0016] Determine a non-structured grid corresponding to the aircraft to be processed, and determine an overall size and a spatial position corresponding to the non-structured grid to be processed, so as to construct a current oriented bounding box containing the non-structured grid to be processed based on the overall size and the spatial position, and determine a bounding box size of the current oriented bounding box; the bounding box size of the current oriented bounding box is greater than the overall size;
[0017] Determine a preset number based on the bounding box size, and set the current oriented bounding box as a current root node, so as to divide the current oriented bounding box into the preset number of child bounding boxes in a current level by using a top-down recursive division manner starting from the current root node, and then bind each of the child bounding boxes in sequence to each of the child nodes corresponding to the current root node in sequence according to a generation order, so as to obtain a current spatial partition structure.
[0018] Optionally, it is judged whether the current level is less than a preset level threshold, if yes, the current level is updated, each of the child bounding boxes is set as a new current oriented bounding box, and then the step of setting the current oriented bounding box as the current root node is re-jumped until the current level is not less than the preset level threshold, and the current spatial partition structure is set as a target spatial partition structure, including:
[0019] It is judged whether the current level is less than a preset level threshold, if yes, a next level of the current level is set as a new current level, each of the child bounding boxes is set as a new current oriented bounding box, and then the step of setting the current oriented bounding box as the current root node is re-jumped;
[0020] If the current level is not less than the preset level threshold, the step of updating the current level is prohibited from being triggered, and the current spatial partition structure is set as the target spatial partition structure.
[0021] Optionally, an interactive object grid set is generated based on a model file of the non-structured grid to be processed, and a minimum bounding box corresponding to each of the interactive objects in the interactive object grid set is determined, and then each of the minimum bounding boxes is subjected to intersection detection with each of the nodes in the target spatial partition structure in sequence according to a level from small to large, so as to determine a bottom leaf node intersecting with the minimum bounding box, and data of the interactive object is stored into the corresponding bottom leaf node, including:
[0022] Determine the model file corresponding to the non-structured grid to be processed, and generate an interactive object grid set based on the model file, and then determine whether the model file has a target space segmentation structure, if the model file does not have a target space segmentation structure, then jump back to the step of constructing the current oriented bounding box based on the non-structured grid to be processed of the aircraft; wherein the interactive object grid set includes triangular facets, triangular short edges and points;
[0023] If the model file has a target space segmentation structure, then generate a minimum bounding box corresponding to each interactive object in the interactive object grid set using a preset minimum bounding box generation algorithm, and then perform intersection detection between the minimum bounding box and each node in the current level in turn to obtain a current intersection detection result;
[0024] Set the node corresponding to the current intersection detection result as a current to-be-detected node, and perform intersection detection between the minimum bounding box and all child nodes in the current to-be-detected node in turn to obtain a new current intersection detection result, and jump back to the step of performing intersection detection between the minimum bounding box and each node in the current level in turn until the current level is the bottom level in the target space segmentation structure;
[0025] Determine the node corresponding to the current intersection detection result as a bottom-level leaf node intersecting with the minimum bounding box, and store the data of the interactive object corresponding to the minimum bounding box into the corresponding bottom-level leaf node.
[0026] Optionally, the step of storing the data of the interactive object into the corresponding bottom-level leaf node comprises:
[0027] Determine whether the minimum bounding box of the interactive object only has an intersection relationship with the bounding box corresponding to one bottom-level leaf node, if the minimum bounding box of the interactive object only has an intersection relationship with the bounding box corresponding to one bottom-level leaf node, then uniquely store all data information of the interactive object into the bottom-level leaf node;
[0028] If the minimum bounding box of the interactive object has an intersection relationship with the bounding box corresponding to more than one bottom-level leaf node, then store all data information of the interactive object into each bottom-level leaf node intersecting with the minimum bounding box.
[0029] Optionally, the step of determining whether each bottom-level leaf node stores interactive object data and setting a capture state identifier based on the determination result comprises:
[0030] Iterate through each bottom-level leaf node in the target space segmentation structure, and determine whether the node of each bottom-level leaf node stores data of at least one interactive object;
[0031] If data of at least one interactive object is stored in the node internal association of each bottom layer leaf node, the capture state identifier corresponding to the bottom layer leaf node is set to an effective state; the effective state is used to represent that there is an interactive object in the bounding box range corresponding to the bottom layer leaf node;
[0032] If data of at least one interactive object is not stored in the node internal association of each bottom layer leaf node, the capture state identifier corresponding to the bottom layer leaf node is set to an invalid state.
[0033] Optionally, the bounding box corresponding to each bottom layer leaf node provided with a capture state identifier in the interactive range corresponding to the interaction instruction is subjected to collision detection to obtain a target interactive object, comprising:
[0034] After receiving an interaction instruction generated after a user performs an interactive operation on an interactive device, a corresponding interactive region is determined in a three-dimensional space based on the interaction instruction; the interaction instruction includes a screen coordinate point or a coordinate range corresponding to the interactive operation;
[0035] Each first to-be-processed bottom layer leaf node with an effective state capture state identifier is obtained, and spatial range information corresponding to each first to-be-processed bottom layer leaf node is read, and then the interactive region and the spatial range information corresponding to each first to-be-processed bottom layer leaf node are subjected to spatial geometric intersection calculation to obtain a calculation result;
[0036] Based on the calculation result, a second to-be-processed bottom layer leaf node having an intersection relationship with the interactive region is filtered out from each first to-be-processed bottom layer leaf node, and corresponding interactive object data is extracted from each second to-be-processed bottom layer leaf node, and then each interactive object data is stored in a preset data container to generate a preliminary filtering set;
[0037] An object selection function in a preset graphics rendering library is used to generate a detection signal based on the spatial range information, and then all interactive object data in the preliminary filtering set is loaded into a rendering environment;
[0038] In the rendering environment, a geometric intersection point between the detection signal and each interactive object in the preliminary filtering set is determined, and a to-be-matched interactive object is determined from each interactive object in the preliminary filtering set based on the geometric intersection point;
[0039] The to-be-matched interactive object and the geometric intersection point are subjected to determination and matching by using a predetermined determination rule and a preset matching rule to obtain a plurality of target interactive objects, so as to perform human-computer interaction by using each target interactive object.
[0040] In a second aspect, the present application provides a human-computer interaction device based on a non-structured grid of an aircraft, comprising:
[0041] a directional bounding box construction module, configured to construct a current directional bounding box based on a to-be-processed non-structured grid of the aircraft, set the current directional bounding box as a current root node, and then evenly divide the current directional bounding box into a preset number of child bounding boxes at a current level by using a top-down recursive division manner starting from the current root node, and bind each of the child bounding boxes with a child node of the current root node to obtain a current spatial partition structure;
[0042] a spatial partition structure generation module, configured to judge whether the current level is smaller than a preset level threshold, if so, update the current level, and set each of the child bounding boxes as a new current directional bounding box, then re-jump to the step of setting the current directional bounding box as the current root node until the current level is not smaller than the preset level threshold, and set the current spatial partition structure as a target spatial partition structure;
[0043] an intersection detection module, configured to generate a set of interactive object grids based on a model file of the to-be-processed non-structured grid, determine a minimum bounding box corresponding to each interactive object in the set of interactive object grids, and then perform intersection detection between the minimum bounding boxes and each node in the target spatial partition structure in order of increasing level based on the minimum bounding boxes to determine a bottom-level leaf node intersecting with the minimum bounding box, and store data of the interactive object into the corresponding bottom-level leaf node;
[0044] a collision detection module, configured to judge whether interactive object data is stored in each of the bottom-level leaf nodes, set a capture state identifier based on a judgment result, and then perform collision detection between a bounding box corresponding to each bottom-level leaf node provided with the capture state identifier and each of the bottom-level leaf nodes in an interactive range corresponding to an interactive instruction to obtain a target interactive object.
[0045] In a third aspect, the present application provides an electronic device, comprising:
[0046] a memory, configured to save a computer program;
[0047] a processor, configured to execute the computer program to implement the human-computer interaction method based on the non-structured grid of the aircraft.
[0048] In a fourth aspect, the present application provides a computer readable storage medium, configured to save a computer program, wherein the computer program is executed by a processor to implement the human-computer interaction method based on the non-structured grid of the aircraft.
[0049] As can be seen from the above, before the human-computer interaction based on the aircraft unstructured grid is performed, the current oriented bounding box needs to be constructed based on the aircraft unstructured grid to be processed, and the current oriented bounding box is set as a current root node, the current oriented bounding box is equally divided into a preset number of child bounding boxes at a current level from the current root node by using a top-down recursive division manner, and each child bounding box is bound with a child node of the current root node to obtain a current space segmentation structure; it is judged whether the current level is less than a preset level threshold, if less, the current level is updated, and each child bounding box is set as a new current oriented bounding box, and the step of setting the current oriented bounding box as the current root node is re-jumped until the current level is not less than the preset level threshold, and the current space segmentation structure is set as a target space segmentation structure; an interactive object grid set is generated based on a model file of the unstructured grid to be processed, and a minimum bounding box corresponding to each interactive object in the interactive object grid set is determined, then the minimum bounding boxes are sequentially intersected with each node in the target space segmentation structure in order of level from small to large to determine a bottom leaf node intersected with the minimum bounding box, and data of the interactive object is stored in the corresponding bottom leaf node; it is judged whether the interactive object data is stored in each bottom leaf node, and a capture state identifier is set based on a judgment result, then collision detection is performed on the bounding boxes corresponding to each bottom leaf node provided with the capture state identifier in an interactive range corresponding to an interactive instruction to obtain a target interactive object.
[0050] It can be seen that, first, the current oriented bounding box is constructed based on the non-structured grid to be processed of the aircraft, and the current oriented bounding box is set as the current root node, and the current oriented bounding box is divided into a preset number of sub-bounding boxes in the current level by using a top-down recursive division manner from the current root node, and each sub-bounding box is bound with a child node of the current root node to obtain a current spatial partition structure; secondly, it is judged whether the current level is less than a preset level threshold, if less than, the current level is updated, and each sub-bounding box is set as a new current oriented bounding box, and the step of setting the current oriented bounding box as the current root node is re-jumped until the current level is not less than the preset level threshold, and the current spatial partition structure is set as a target spatial partition structure; then, an interactive object grid set is generated based on a model file of the non-structured grid to be processed, and the minimum bounding box corresponding to each interactive object in the interactive object grid set is determined, and then the minimum bounding box is sequentially intersected with each node in the target spatial partition structure in order of level from small to large to determine the bottom leaf node intersected with the minimum bounding box, and the data of the interactive object is stored in the corresponding bottom leaf node; finally, it is judged whether the interactive object data is stored in each bottom leaf node, and a capture state identifier is set based on the judgment result, and then the bounding box corresponding to each bottom leaf node provided with the capture state identifier is collided in the interactive range corresponding to the interactive instruction to obtain a target interactive object. In this way, the efficiency of human-computer interaction based on the non-structured grid of the aircraft is improved in the process of human-computer interaction based on the non-structured grid of the aircraft, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.
[0052] Figure 1 A flow chart of a human-computer interaction method based on a non-structured grid of an aircraft is disclosed in the present application.
[0053] Figure 2 A flow chart of a specific dimension division of a bounding box is disclosed.
[0054] Figure 3 A specific ray projection diagram of a three-dimensional R-tree to a two-dimensional horizontal plane is disclosed. Figure 3 (a) is a projection diagram of a two-dimensional plane, Figure 3 (b) is a projection diagram of a tree structure.
[0055] Figure 4 A specific bounding box division diagram corresponding to the first layer according to the present application;
[0056] Figure 5 A specific bounding box division diagram corresponding to the second layer according to the present application;
[0057] Figure 6 A specific bounding box division diagram corresponding to the third layer according to the present application;
[0058] Figure 7 A specific bounding box division diagram corresponding to the fourth layer according to the present application;
[0059] Figure 8 A specific diagram of binding a bounding box with a tree node according to the present application;
[0060] Figure 9 A specific model file diagram according to the present application;
[0061] Figure 10 A specific non-structure interactive object grid data diagram generated according to a model file according to the present application;
[0062] Figure 11 A specific diagram of constructing a minimum bounding box of an interactive object according to the present application;
[0063] Figure 12 A specific restocking state setting diagram according to the present application; wherein, Figure 12 (a) is a plan view, Figure 12 (b) is a three-dimensional view;
[0064] Figure 13 A specific interactive time comparison diagram corresponding to bounding boxes created with different scopes according to the present application;
[0065] Figure 14 A specific capture operation time consumption comparison diagram according to the present application;
[0066] Figure 15 A specific human-computer interaction device structure diagram based on an aircraft non-structure grid according to the present application;
[0067] Figure 16 A specific electronic device structure diagram according to the present application. DETAILED DESCRIPTION
[0068] With reference to the drawings and the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of the present application.
[0069] Currently, the three-dimensional space index technology research mainly focuses on octree, three-dimensional R-tree and the like. However, the above algorithms have certain requirements for application scenarios, that is, they are not applicable to mesh model data with various model morphologies for uniformly distributed point cloud data. In addition, the octree algorithm has certain limitations. For non-uniform data, the intermediate nodes of the octree need to continue to divide the octree according to the convergence condition until the condition converges. Therefore, the present application provides a man-machine interaction method based on aircraft unstructured mesh, which can improve the efficiency of man-machine interaction based on aircraft unstructured mesh in the process of man-machine interaction based on aircraft unstructured mesh.
[0070] Referring to Figure 1 The embodiment of the present application discloses a man-machine interaction method based on aircraft unstructured mesh, comprising:
[0071] Step S11, based on the aircraft unstructured mesh to be processed, a current oriented bounding box is constructed, and the current oriented bounding box is set as a current root node. Then, a top-down recursive division method is used to divide the current oriented bounding box into a preset number of sub-bounding boxes at the current level from the current root node, and each sub-bounding box is bound to a child node of the current root node, to obtain a current space partition structure.
[0072] In the embodiment, the octree is a commonly used space data structure, each node of which can be represented by a cube. Each node can be divided into 8 parts (i.e. child nodes), and the sum of the volume elements corresponding to the 8 child nodes is equal to the volume of the parent node. The specific division steps are as follows: first, a minimum enclosing cube is established according to the model size, and then the cube is divided in 8 dimensions to decompose it into a plurality of small cubes, such as Figure 2 As shown in the figure, it has the advantage of fast access to corresponding data. In addition, the three-dimensional R-tree (rectangular tree) mainly divides the space object. The advantage of this algorithm is high space index efficiency and fast query speed. As shown in Figure 3 It can be understood that the areas of different space index directory rectangles can overlap.
[0073] In the embodiment, in the process of human-computer interaction based on the aircraft non-structural grid, the N-ary tree with a depth of L is first created according to the size of the bounding box. In a specific embodiment, L is 10 and N is 27 in the embodiment. That is, the N-ary tree division method in the embodiment divides the three-dimensional space into 27 regular hexahedral data structures, wherein the obtained hexahedral data structures are nodes of the 27-ary tree, and the nodes are recursively subdivided into the next layer of nodes. Subsequently, a non-structural surface interaction object grid data is constructed, and the interaction object is bound to the leaf nodes of the tree.
[0074] Specifically, based on the aircraft to be processed non-structural grid, the current oriented bounding box is constructed, and the current oriented bounding box is set as the current root node. Then, the current oriented bounding box is evenly divided into a preset number of sub-bounding boxes at the current level by using a top-down recursive division method from the current root node, and each sub-bounding box is bound to a child node of the current root node to obtain a current space partition structure. The method can include: determining the aircraft corresponding to the non-structural grid to be processed, and determining the overall size and spatial position corresponding to the non-structural grid to be processed, to construct the current oriented bounding box containing the non-structural grid to be processed based on the overall size and spatial position, and determine the bounding box size of the current oriented bounding box; the bounding box size of the current oriented bounding box is greater than the overall size; the preset number is determined based on the bounding box size, and the current oriented bounding box is set as the current root node, to evenly divide the current oriented bounding box into a preset number of sub-bounding boxes at the current level by using a top-down recursive division method from the current root node, and then sequentially bind each sub-bounding box to each child node corresponding to the current root node in turn to obtain the current space partition structure.
[0075] Step S12, determining whether the current level is less than the preset level threshold. If it is less than, the current level is updated, and each of the sub-bounding boxes is set as a new current oriented bounding box. Then, the step of setting the current oriented bounding box as the current root node is re-jumped to until the current level is not less than the preset level threshold, and the current space partition structure is set as the target space partition structure.
[0076] In the embodiment, the process of constructing the current bounding box is as follows: first, a directed bounding box is constructed according to the size and position of the non-structural grid model, then the directed bounding box is recursively divided in a top-down manner, and then all nodes in the current layer R are traversed and divided into 27 child nodes in the R+1 layer, and the above steps are repeated until the predefined layer number L is reached.
[0077] In a specific embodiment, the f6 model is taken as an example, and the schematic diagram of dividing the directed bounding box is shown in Figure 4 、 5 , 6, 7, wherein,Figure 4 a bounding box division diagram corresponding to the first layer, Figure 5 a bounding box division diagram corresponding to the second layer, Figure 6 a bounding box division diagram corresponding to the third layer, Figure 7 a bounding box division diagram corresponding to the fourth layer. As shown in Figure 4 , the first layer bounding box is bound with the root node of the tree. It is worth mentioning that in the process of mesh optimization, the user will perform a projection operation on the interactive object, which will change the position of the patch. In order to increase the universality of the bounding box, the size of the bounding box is larger than the size of the model. Then, according to the size of the first layer bounding box, the second layer bounding box is created. The number of the second layer bounding box in the embodiment of the application is 27, and the bounding box is bound with the child node of the tree. By analogy, the four-layer bounding box is bound with the tree node one by one, and the display diagram is shown in Figure 8 .
[0078] Specifically, the step of determining whether the current level is less than the preset level threshold, if less, updating the current level, and setting each child bounding box as a new current directed bounding box, and then jumping back to the step of setting the current directed bounding box as the current root node, until the current level is not less than the preset level threshold, and setting the current space partition structure as the target space partition structure, can include: determining whether the current level is less than the preset level threshold, if the current level is less than the preset level threshold, setting the next level of the current level as a new current level, and setting each child bounding box as a new current directed bounding box, and then jumping back to the step of setting the current directed bounding box as the current root node; if the current level is not less than the preset level threshold, the step of updating the current level is prohibited, and the current space partition structure is set as the target space partition structure.
[0079] In step S13, an interactive object mesh set is generated based on the model file of the non-structure mesh to be processed, and a minimum bounding box corresponding to each interactive object in the interactive object mesh set is determined. Then, the minimum bounding boxes are sequentially intersected with each node in the target space partition structure in order of level from small to large, to determine the bottom leaf node intersected with the minimum bounding box, and the data of the interactive object is stored in the corresponding bottom leaf node.
[0080] In this embodiment, the process of constructing the interactive object mesh data of the non-structure surface and binding the interactive object with the tree leaf node is as follows: first, import the model file as shown in Figure 9 , then generate the interactive object mesh set as shown in Figure 10The illustrated non-structure interaction object grid data is then determined whether the octree exists, if not, the octree and bounding box construction step is executed, if exists, the minimum bounding box of the interaction object is constructed according to the size of the interaction object, and the schematic diagram of the minimum bounding box of the interaction object is constructed as Figure 11 The illustrated, wherein, "interaction object 1" is an interaction object. Furthermore, the embodiment of the present application needs to traverse all the bounding boxes in the current layer R, and then the intersection detection of the interaction object bounding box and the current layer bounding box of the octree is performed according to the size of the interaction object bounding box, the intersecting bounding boxes are found, and the R+1 layer sub-bounding box data contained by the bounding box is obtained, and the intersection detection is performed again, finally, the above steps are repeated until the leaf node of the octree is found, and then the current interaction object is added to each intersecting leaf node to increase the capture accuracy.
[0081] Specifically, based on the model file of the non-structure grid to be processed, an interaction object grid set is generated, and the minimum bounding box corresponding to each interaction object in the interaction object grid set is determined, then the intersection detection is performed between the minimum bounding box and each node in the target space segmentation structure in order according to the hierarchical order from small to large, to determine the bottom layer leaf node intersecting with the minimum bounding box, and the data of the interaction object is stored in the corresponding bottom layer leaf node, which can include: determining the model file corresponding to the non-structure grid to be processed, and generating an interaction object grid set based on the model file, then judging whether the model file exists in the target space segmentation structure, if the model file does not exist in the target space segmentation structure, then jump back to the step of constructing the current directed bounding box based on the non-structure grid of the aircraft; wherein the interaction object grid set includes triangular facets, triangular short sides and points; if the model file exists in the target space segmentation structure, the minimum bounding box corresponding to each interaction object in the interaction object grid set is generated by using a preset minimum bounding box generation algorithm, then the intersection detection is performed between the minimum bounding box and each node in the current level in order to obtain the current intersection detection result; the node corresponding to the current intersection detection result is set as the current to-be-detected node, and the intersection detection is performed between the minimum bounding box and all the child nodes in the current to-be-detected node in order to obtain the new current intersection detection result, and jump back to the step of performing the intersection detection between the minimum bounding box and each node in the current level until the current level is the bottommost level in the target space segmentation structure; the node corresponding to the current intersection detection result is determined as the bottom layer leaf node intersecting with the minimum bounding box, and the data of the interaction object corresponding to the minimum bounding box is stored in the corresponding bottom layer leaf node.
[0082] Further, the storing of the data of the interactive object into the corresponding bottom-level leaf node can include: judging whether the minimum bounding box of the interactive object only has an intersection relationship with the bounding box corresponding to one bottom-level leaf node, and if the minimum bounding box of the interactive object only has an intersection relationship with the bounding box corresponding to one bottom-level leaf node, storing all data information of the interactive object into the bottom-level leaf node uniquely; and if the minimum bounding box of the interactive object has an intersection relationship with the bounding box corresponding to more than one bottom-level leaf node, storing all data information of the interactive object into each bottom-level leaf node intersecting with the minimum bounding box respectively.
[0083] Step S14, judging whether the interactive object data is stored in each bottom-level leaf node, and setting a capture state identifier based on the judging result, and then performing collision detection on the bounding box corresponding to each bottom-level leaf node provided with the capture state identifier in the interactive range corresponding to the interactive instruction, to obtain the target interactive object.
[0084] In the embodiment, the application embodiment needs to set the bounding box not containing the interactive object as the non-capture state and set the bounding box containing the interactive object as the capture state according to the situation of the interactive object contained in the leaf node, and the set state is as shown in Figure 12 , wherein, Figure 12 (a) is a plane schematic diagram, Figure 12 (b) is a three-dimensional schematic diagram. Specifically, judging whether the interactive object data is stored in each bottom-level leaf node, and setting a capture state identifier based on the judging result, can include: traversing each bottom-level leaf node in the target space partition structure, and judging whether the node inside each bottom-level leaf node is associated with the data of at least one interactive object; if the node inside each bottom-level leaf node is associated with the data of at least one interactive object, setting the capture state identifier corresponding to the bottom-level leaf node as an effective state; the effective state is used to represent that there is an interactive object in the bounding box range corresponding to the bottom-level leaf node; and if the node inside each bottom-level leaf node is not associated with the data of at least one interactive object, setting the capture state identifier corresponding to the bottom-level leaf node as an invalid state.
[0085] It is worth mentioning that the collision checking in the embodiments of the present application is divided into two parts: first, rough screening, that is, the bounding box of the screen coordinate position is collided with the bounding box of the capture flag, and the interactive object in the bounding box is taken out and loaded into the container, and then fine capture is performed, that is, the image rendering technology is used to detect the collision, and it is worth mentioning that there is a corresponding collision checking mechanism in OpenGL, that is, Picking. The principle is to generate a ray by connecting the camera and the screen coordinate, judge the intersection of the ray and the objects in the scene, and return the intersecting objects. The interactive object container screened in the first step is added to OpengGL to accurately screen the intersecting interactive objects using OpengGL, and the interactive time comparison chart corresponding to the bounding boxes created by different widths is as shown in Figure 13 The time consumption of the capture operation is as shown in Figure 14
[0086] Specifically, the bounding boxes corresponding to the bottom leaf nodes provided with the capture state identifiers in the interactive range corresponding to the interactive instruction are subjected to collision detection to obtain target interactive objects, which can include: after receiving the interactive instruction generated after the user performs an interactive operation on the interactive device, determining the corresponding interactive region in the three-dimensional space based on the interactive instruction; the interactive instruction includes a screen coordinate point or a coordinate range corresponding to the interactive operation; obtaining first to-be-processed bottom leaf nodes with the capture state identifiers being in the effective state, and reading the spatial range information corresponding to each first to-be-processed bottom leaf node, and then performing spatial geometric intersection calculation on the interactive region and the spatial range information corresponding to each first to-be-processed bottom leaf node to obtain a calculation result; based on the calculation result, screening second to-be-processed bottom leaf nodes having an intersection relationship with the interactive region from the first to-be-processed bottom leaf nodes, and extracting corresponding interactive object data from each second to-be-processed bottom leaf node, and then storing each interactive object data in a preset data container to generate a preliminary screening set; using the object selection function in the preset graphics rendering library and based on the spatial range information to generate a detection signal, and then loading all the interactive object data in the preliminary screening set into a rendering environment; determining geometric intersection points between the detection signal and each interactive object in the preliminary screening set in the rendering environment, and determining to-be-matched interactive objects from each interactive object in the preliminary screening set with the geometric intersection points; using a predetermined determination rule and a preset matching rule to determine and match the to-be-matched interactive objects and the geometric intersection points to obtain a plurality of target interactive objects, so as to use each target interactive object for human-computer interaction.
[0087] As can be seen, the embodiment of the present application first needs to construct a current oriented bounding box based on the non-structured grid to be processed of the aircraft, set the current oriented bounding box as a current root node, divide the current oriented bounding box into a preset number of child bounding boxes in a current level from the current root node by using a top-down recursive division manner, bind each child bounding box with a child node of the current root node, and obtain a current spatial partition structure; secondly, it is judged whether the current level is less than a preset level threshold, if less, the current level is updated, each child bounding box is set as a new current oriented bounding box, and the step of setting the current oriented bounding box as the current root node is re-jumped until the current level is not less than the preset level threshold, and the current spatial partition structure is set as a target spatial partition structure; then, an interactive object grid set is generated based on a model file of the non-structured grid to be processed, and a minimum bounding box corresponding to each interactive object in the interactive object grid set is determined, and then the minimum bounding box is sequentially intersected with each node in the target spatial partition structure in order of level from small to large to determine a bottom leaf node intersected with the minimum bounding box, and data of the interactive object is stored in the corresponding bottom leaf node; finally, it is judged whether the interactive object data is stored in each bottom leaf node, and a capture state identifier is set based on the judgment result, and then a bounding box corresponding to each bottom leaf node provided with the capture state identifier is collided in an interactive range corresponding to the interactive instruction to obtain a target interactive object. In this way, the efficiency of human-computer interaction based on the non-structured grid of the aircraft is improved in the process of human-computer interaction based on the non-structured grid of the aircraft, and the user experience is improved.
[0088] Correspondingly, referring to Figure 15 The application further provides a human-computer interaction device based on a non-structured grid of an aircraft, comprising:
[0089] The oriented bounding box construction module 11 is configured to construct a current oriented bounding box based on a non-structured grid to be processed of an aircraft, set the current oriented bounding box as a current root node, divide the current oriented bounding box into a preset number of child bounding boxes in a current level from the current root node by using a top-down recursive division manner, bind each child bounding box with a child node of the current root node, and obtain a current spatial partition structure;
[0090] The spatial partition structure generation module 12 is configured to judge whether the current level is less than a preset level threshold, if less, update the current level, set each child bounding box as a new current oriented bounding box, and re-jump to the step of setting the current oriented bounding box as the current root node until the current level is not less than the preset level threshold, and set the current spatial partition structure as a target spatial partition structure;
[0091] The intersection detection module 13 is configured to generate a set of interactive object meshes based on the model file of the non-structure mesh to be processed, determine a minimum bounding box corresponding to each interactive object in the set of interactive object meshes, and then perform intersection detection between each node in the target space partition structure and the minimum bounding box in a hierarchical order from small to large based on the minimum bounding box to determine a bottom-level leaf node intersecting with the minimum bounding box, and store data of the interactive object into the corresponding bottom-level leaf node.
[0092] The collision detection module 14 is configured to determine whether the interactive object data is stored in each bottom-level leaf node, set a capture state identifier based on the determination result, and then perform collision detection between the bounding box corresponding to each bottom-level leaf node with the set capture state identifier and the interactive range corresponding to the interactive instruction to obtain a target interactive object.
[0093] In some embodiments, the directional bounding box construction module 11 can specifically include:
[0094] The bounding box size determination unit is configured to determine the non-structure mesh corresponding to the aircraft, determine the overall size and spatial position corresponding to the non-structure mesh to be processed, construct a current directional bounding box containing the non-structure mesh to be processed based on the overall size and the spatial position, and determine the bounding box size of the current directional bounding box; the bounding box size of the current directional bounding box is greater than the overall size.
[0095] The bounding box equal division unit is configured to determine a preset number based on the bounding box size, set the current directional bounding box as a current root node, and divide the current directional bounding box into a preset number of child bounding boxes at a current level by using a top-down recursive division manner, then bind each child bounding box to each child node corresponding to the current root node in a generation order to obtain a current space partition structure.
[0096] In some embodiments, the space partition structure generation module 12 can specifically include:
[0097] The current level judgment unit is configured to determine whether the current level is less than a preset level threshold, if the current level is less than the preset level threshold, set a next level of the current level as a new current level, and set each child bounding box as a new current directional bounding box, and then jump back to the step of setting the current directional bounding box as the current root node.
[0098] The target space partition structure determination unit is configured to, if the current level is not less than the preset level threshold, prohibit triggering the step of updating the current level, and set the current space partition structure as a target space partition structure.
[0099] In some embodiments, the intersection detection module 13 can specifically include:
[0100] A model file determination unit is configured to determine a model file corresponding to the to-be-processed unstructured grid, generate an interactive object grid set based on the model file, and then determine whether the model file has a target spatial segmentation structure. If the model file does not have a target spatial segmentation structure, the method reverts to the step of constructing a current oriented bounding box based on the to-be-processed unstructured grid of the aircraft. The interactive object grid set includes a triangular facet, a triangular short side, and a point.
[0101] An intersection detection result determination unit is configured to, if the model file has a target spatial segmentation structure, generate a minimum bounding box corresponding to each interactive object in the interactive object grid set by using a preset minimum bounding box generation algorithm, and then perform intersection detection between the minimum bounding box and each node in the current level in sequence to obtain a current intersection detection result.
[0102] A step jumping unit is configured to set the node corresponding to the current intersection detection result as a current to-be-detected node, perform intersection detection between the minimum bounding box and all child nodes in the current to-be-detected node in sequence to obtain a new current intersection detection result, and revert to the step of performing intersection detection between the minimum bounding box and each node in the current level in sequence until the current level is the lowest level in the target spatial segmentation structure.
[0103] A first data storage unit is configured to determine the node corresponding to the current intersection detection result as a bottom-level leaf node intersecting with the minimum bounding box, and store data of the interactive object corresponding to the minimum bounding box into the corresponding bottom-level leaf node.
[0104] In some embodiments, the intersection detection module 13 can specifically include:
[0105] An intersection relationship judgment unit is configured to determine whether the minimum bounding box of the interactive object has an intersection relationship with only one bounding box corresponding to a bottom-level leaf node. If the minimum bounding box of the interactive object has an intersection relationship with only one bounding box corresponding to a bottom-level leaf node, the method uniquely associates and stores all data information of the interactive object into the bottom-level leaf node.
[0106] A second data storage unit is configured to, if the minimum bounding box of the interactive object has an intersection relationship with more than one bounding box corresponding to a bottom-level leaf node, respectively associate and store all data information of the interactive object into each bottom-level leaf node intersecting with the minimum bounding box.
[0107] In some embodiments, the collision detection module 14 can specifically include:
[0108] The leaf node traversal unit is configured to traverse each bottom layer leaf node in the target space partition structure and determine whether the node interior of each bottom layer leaf node is associated with storage of data of at least one interactive object.
[0109] The first capture state identifier setting unit is configured to, if the node interior of each bottom layer leaf node is associated with storage of data of at least one interactive object, set the capture state identifier corresponding to the bottom layer leaf node to an effective state; the effective state is used to represent that there is an interactive object in the bounding box range corresponding to the bottom layer leaf node.
[0110] The second capture state identifier setting unit is configured to, if the node interior of each bottom layer leaf node is not associated with storage of data of at least one interactive object, set the capture state identifier corresponding to the bottom layer leaf node to an invalid state.
[0111] In some embodiments, the collision detection module 14 can specifically include:
[0112] The interactive region determination unit is configured to, after receiving an interactive instruction generated after a user performs an interactive operation on an interactive device, determine a corresponding interactive region in a three-dimensional space based on the interactive instruction; the interactive instruction includes a screen coordinate point or a coordinate range corresponding to the interactive operation.
[0113] The calculation result determination unit is configured to obtain each first bottom layer leaf node to be processed with the capture state identifier being in the effective state, read the spatial range information corresponding to each first bottom layer leaf node to be processed, and then perform spatial geometric intersection calculation on the interactive region and the spatial range information corresponding to each first bottom layer leaf node to be processed to obtain a calculation result.
[0114] The screening set determination unit is configured to screen, based on the calculation result, a second bottom layer leaf node to be processed from each first bottom layer leaf node to be processed, which has an intersection relationship with the interactive region, extract corresponding interactive object data from each second bottom layer leaf node to be processed, and then store each interactive object data in a preset data container to generate a preliminary screening set.
[0115] The detection signal generation unit is configured to generate a detection signal based on the object selection function in a preset graphics rendering library and the spatial range information, and then load all interactive object data in the preliminary screening set into a rendering environment.
[0116] a geometric intersection determination unit, configured to determine a geometric intersection between the detection signal and each of the interaction objects in the preliminary screening set in the rendering environment, and determine a to-be-matched interaction object from each of the interaction objects in the preliminary screening set according to the geometric intersection;
[0117] a target interaction object determination unit, configured to determine and match the to-be-matched interaction object and the geometric intersection according to a predetermined determination rule and a preset matching rule, to obtain a plurality of target interaction objects, and perform human-computer interaction by using each of the target interaction objects.
[0118] Further, the embodiment of the present application further discloses an electronic device, Figure 16 is an electronic device 20 structure diagram shown according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation on the use range of the present application. The electronic device 20, specifically can include: at least one processor 21, at least one memory 22, power supply 23, communication interface 24, input output interface 25 and communication bus 26. Wherein, the memory 22 is used for storing computer programs, the computer programs are loaded and executed by the processor 21, to realize the related steps in the foregoing any embodiment disclosed human-computer interaction method based on aircraft unstructured grid. In addition, the electronic device 20 in the embodiment specifically can be electronic computer.
[0119] In the embodiment, the power supply 23 is used for providing working voltage for each hardware device on the electronic device 20; the communication interface 24 can create data transmission channel between the electronic device 20 and external device, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not specifically limited here; the input output interface 25 is used for obtaining external input data or outputting data to the outside, and the specific interface type can be selected according to the specific application needs, which is not specifically limited here.
[0120] In addition, the memory 22 as the carrier of resource storage can be read-only memory, random access memory, disk or optical disk, etc., and the resources stored thereon can include operating system 221, computer program 222, etc., and the storage mode can be temporary storage or permanent storage.
[0121] Wherein, the operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. The computer program 222 can further include computer programs capable of completing other specific work in addition to the computer programs capable of completing the human-computer interaction method based on aircraft unstructured grid executed by the electronic device 20 disclosed in any of the foregoing embodiments.
[0122] Further, the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to realize the aircraft non-structural grid-based human-computer interaction method disclosed above. For the specific steps of the method, refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0123] The various embodiments are described in the specification by progressive stages, and each embodiment focuses on the difference from other embodiments. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts are described in the method part.
[0124] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0125] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0126] Finally, it should be noted that in this document, relationship terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0127] The technical solutions provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by using specific examples. The above description of the examples is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description of the content of the specification should not be understood as a limitation on the present application.
Claims
1. A method for human-machine interaction based on unstructured mesh of an aircraft, characterized in that, The method comprises the following steps: constructing a current oriented bounding box based on a non-structured grid to be processed of an aircraft, setting the current oriented bounding box as a current root node, then equally dividing the current oriented bounding box into a preset number of child bounding boxes at a current level by using a top-down recursive division manner starting from the current root node, and binding each of the child bounding boxes to a child node of the current root node to obtain a current spatial partition structure; judging whether the current level is smaller than a preset level threshold, if yes, updating the current level, setting each of the child bounding boxes as a new current oriented bounding box, then re-jumping to the step of setting the current oriented bounding box as the current root node until the current level is not smaller than the preset level threshold, and setting the current spatial partition structure as a target spatial partition structure; generating an interactive object grid set based on a model file of the non-structured grid to be processed, determining a minimum bounding box corresponding to each interactive object in the interactive object grid set, then performing intersection detection between the minimum bounding boxes and each node in the target spatial partition structure in order of level from small to large to determine a bottom-level leaf node intersecting with the minimum bounding box, and storing data of the interactive object into the corresponding bottom-level leaf node; judging whether interactive object data is stored in each of the bottom-level leaf nodes, setting a capture state identifier based on the judgment result, then performing collision detection between a bounding box corresponding to each bottom-level leaf node provided with the capture state identifier and a bounding box corresponding to each bottom-level leaf node provided with the capture state identifier in an interactive range corresponding to an interactive instruction to obtain a target interactive object.
2. The aircraft non-structural mesh-based human-machine interaction method of claim 1, wherein, The method of constructing a current oriented bounding box based on a non-structured grid to be processed of an aircraft, setting the current oriented bounding box as a current root node, then equally dividing the current oriented bounding box into a preset number of child bounding boxes at a current level by using a top-down recursive division manner starting from the current root node, and binding each of the child bounding boxes to a child node of the current root node to obtain a current spatial partition structure, comprises the following steps: determining a non-structured grid to be processed corresponding to an aircraft, determining an overall size and a spatial position corresponding to the non-structured grid to be processed, constructing a current oriented bounding box containing the non-structured grid to be processed based on the overall size and the spatial position, and determining a bounding box size of the current oriented bounding box; the bounding box size of the current oriented bounding box is greater than the overall size; determining a preset number based on the bounding box size, setting the current oriented bounding box as a current root node, then equally dividing the current oriented bounding box into the preset number of child bounding boxes at a current level by using a top-down recursive division manner starting from the current root node, and binding each of the child bounding boxes to each child node corresponding to the current root node in order of generation to obtain a current spatial partition structure.
3. The aircraft non-structural mesh-based human-machine interaction method of claim 1, wherein, The step of judging whether the current level is less than the preset level threshold, if yes, setting a next level of the current level as a new current level, setting each of the sub bounding boxes as a new current directional bounding box, and then rejumping to the step of setting the current directional bounding box as the current root node, until the current level is not less than the preset level threshold, and setting the current spatial partition structure as the target spatial partition structure, comprises: The step of judging whether the current level is less than the preset level threshold, if yes, setting a next level of the current level as a new current level, setting each of the sub bounding boxes as a new current directional bounding box, and then rejumping to the step of setting the current directional bounding box as the current root node, until the current level is not less than the preset level threshold, and setting the current spatial partition structure as the target spatial partition structure, comprises: If the current level is not less than the preset level threshold, the step of updating the current level is prohibited, and the current spatial partition structure is set as the target spatial partition structure.
4. The aircraft non-structural mesh-based human-machine interaction method of claim 1, wherein, The step of generating the interactive object mesh set based on the model file of the to-be-processed unstructured mesh, and determining the minimum bounding box corresponding to each interactive object in the interactive object mesh set, and then performing intersection detection between the minimum bounding box and each node in the target spatial partition structure in order based on the level from small to large, to determine the bottom-level leaf node intersecting with the minimum bounding box, and storing the data of the interactive object into the corresponding bottom-level leaf node, comprises: The step of determining the model file corresponding to the to-be-processed unstructured mesh, and generating an interactive object mesh set based on the model file, and then judging whether the model file exists the target spatial partition structure, if not, rejumping to the step of constructing the current directional bounding box based on the to-be-processed unstructured mesh of the aircraft, wherein the interactive object mesh set comprises a triangular facet, a triangular short side and a point; If the model file exists the target spatial partition structure, a minimum bounding box corresponding to each interactive object in the interactive object mesh set is generated by using a preset minimum bounding box generation algorithm, and then the minimum bounding box and each node in the current level are subjected to intersection detection to obtain a current intersection detection result; The node corresponding to the current intersection detection result is set as a current to-be-detected node, and the minimum bounding box and all child nodes in the current to-be-detected node are subjected to intersection detection in order to obtain a new current intersection detection result, and the step of performing intersection detection between the minimum bounding box and each node in the current level is rejumped to until the current level is the bottommost level in the target spatial partition structure; The node corresponding to the current intersection detection result is determined as the bottom-level leaf node intersecting with the minimum bounding box, and the data of the interactive object corresponding to the minimum bounding box is stored into the corresponding bottom-level leaf node.
5. The aircraft non-structural mesh-based human-machine interaction method of claim 1, wherein, The step of storing the data of the interactive object into the corresponding bottom-level leaf node, comprises: determine whether the minimum bounding box of the interactive object only has an intersection relationship with the bounding box corresponding to one bottom-level leaf node, and if the minimum bounding box of the interactive object only has an intersection relationship with the bounding box corresponding to one bottom-level leaf node, store all data information of the interactive object in the bottom-level leaf node in a unique manner; if the minimum bounding box of the interactive object has an intersection relationship with the bounding boxes corresponding to more than one bottom-level leaf node, store all data information of the interactive object in each bottom-level leaf node that has an intersection relationship with the minimum bounding box.
6. The aircraft non-structural mesh-based human-machine interaction method of claim 1, wherein, The judgment of whether the interactive object data is stored in each bottom-level leaf node and the setting of the capture state identifier based on the judgment result include: traverse each bottom-level leaf node in the target space segmentation structure, and determine whether at least one interactive object data is associated and stored in the node interior of each bottom-level leaf node; if at least one interactive object data is associated and stored in the node interior of each bottom-level leaf node, set the capture state identifier corresponding to the bottom-level leaf node to an effective state; the effective state is used to represent that there is an interactive object in the bounding box range corresponding to the bottom-level leaf node; if at least one interactive object data is not associated and stored in the node interior of each bottom-level leaf node, set the capture state identifier corresponding to the bottom-level leaf node to an invalid state.
7. The aircraft non-structural mesh-based human-machine interaction method according to any one of claims 1 to 6, characterized in that, The collision detection of the bounding boxes corresponding to each bottom-level leaf node with the set capture state identifier in the interactive range corresponding to the interactive instruction to obtain the target interactive object includes: after receiving the interactive instruction generated after the user performs an interactive operation on the interactive device, determine the corresponding interactive region in the three-dimensional space based on the interactive instruction; the interactive instruction includes a screen coordinate point or a coordinate range corresponding to the interactive operation; obtain each first bottom-level leaf node to be processed with an effective capture state identifier, read the spatial range information corresponding to each first bottom-level leaf node to be processed, and then perform spatial geometric intersection calculation on the interactive region and the spatial range information corresponding to each first bottom-level leaf node to be processed to obtain a calculation result; based on the calculation result, filter out second bottom-level leaf nodes to be processed that have an intersection relationship with the interactive region from each first bottom-level leaf node to be processed, extract corresponding interactive object data from each second bottom-level leaf node to be processed, and then merge and store each interactive object data in a preset data container to generate a preliminary filtering set; use the object selection function in the preset graphics rendering library and generate a detection signal based on the spatial range information, and then load all interactive object data in the preliminary filtering set into a rendering environment; determine the geometric intersection point between the detection signal and each interactive object in the preliminary filtering set in the rendering environment, and determine the interactive object to be matched from each interactive object in the preliminary filtering set based on the geometric intersection point. The predetermined determination rule and the preset matching rule are used to determine and match the to-be-matched interactive object and the geometric intersection point, to obtain a plurality of target interactive objects, and to perform human-computer interaction by using each of the target interactive objects.
8. A human-machine interaction device based on an unstructured mesh of an aircraft, characterized in that, The method comprises the steps of: a directional bounding volume construction module, configured to construct a current directional bounding volume based on a to-be-processed unstructured grid of an aircraft, set the current directional bounding volume as a current root node, and then use a top-down recursive division manner to divide the current directional bounding volume into a preset number of child bounding volumes at a current level from the current root node, and bind each of the child bounding volumes to a child node of the current root node to obtain a current spatial partition structure; a spatial partition structure generation module, configured to determine whether the current level is less than a preset level threshold, if yes, update the current level, and set each of the child bounding volumes as a new current directional bounding volume, then jump back to the step of setting the current directional bounding volume as the current root node until the current level is not less than the preset level threshold, and set the current spatial partition structure as a target spatial partition structure; an intersection detection module, configured to generate an interactive object grid set based on a model file of the to-be-processed unstructured grid, determine a minimum bounding box corresponding to each interactive object in the interactive object grid set, and then perform intersection detection between the minimum bounding boxes and each node in the target spatial partition structure in order of level from small to large based on the minimum bounding boxes to determine a bottom leaf node intersecting with the minimum bounding box, and store data of the interactive object in the corresponding bottom leaf node; a collision detection module, configured to determine whether interactive object data is stored in each of the bottom leaf nodes, set a capture state identifier based on the determination result, and then perform collision detection between the bounding boxes corresponding to each bottom leaf node with the set capture state identifier and an interactive range corresponding to an interactive instruction to obtain a target interactive object.
9. An electronic device, comprising: The method comprises the steps of: a memory, configured to save a computer program; a processor, configured to execute the computer program to implement the human-computer interaction method based on the unstructured grid of the aircraft according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is saved, and the computer program is executed by a processor to implement the human-computer interaction method based on the unstructured grid of the aircraft according to any one of claims 1 to 7.
Citation Information
Patent Citations
Implementation method of real-time collision detection system
CN102509317A
Human-computer interaction method and device for large-scale grid, equipment and medium
CN116702657A
Physical collision monitoring and feedback method and equipment based on digital twin engine, and storage medium
CN120012524A
Hybrid spatial indexing method, system, electronic device and computer program product
CN120634841A
Universal motion simulation method and universal collision detection method for five-axis computer numerical control machine tools
WO2025050473A1
Cited By
Interaction method, device and equipment suitable for aircraft unstructured grid software and medium
CN121835033A
Interaction method, device and equipment suitable for aircraft non-structural grid software and medium
CN121835033B