Navigation data processing method and device, storage medium and electronic equipment

文档序号:1148902 发布日期:2020-09-15 浏览:4次 中文

阅读说明:本技术 导航数据的处理方法及装置、存储介质、电子设备 (Navigation data processing method and device, storage medium and electronic equipment ) 是由 王帅 于 2020-07-17 设计创作,主要内容包括:本公开属于数据处理技术领域,涉及一种导航数据的处理方法及装置、存储介质、电子设备。该方法包括:获取游戏场景模型的初始导航网格,并获取作用于初始导航网格的点击操作的目标位置信息;根据目标位置信息在初始导航网格中确定待编辑导航网格,并接收针对待编辑导航网格的编辑功能指令;根据编辑功能指令对待编辑导航网格进行编辑得到目标导航网格,以保存游戏场景模型的目标导航网格。本公开一方面,待编辑导航网格可以是任意的多边形,解决了无法实现或者拼接实现的不完美切割问题,能够进一步实现更多更为精准的功能;另一方面,编辑方式更加自动化,便于统一修改和热更新,减少了投入的人力成本和时间成本。(The disclosure belongs to the technical field of data processing, and relates to a navigation data processing method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring an initial navigation grid of a game scene model, and acquiring target position information of a click operation acting on the initial navigation grid; determining a navigation grid to be edited in the initial navigation grid according to the target position information, and receiving an editing function instruction aiming at the navigation grid to be edited; and editing the navigation grid to be edited according to the editing function instruction to obtain a target navigation grid so as to store the target navigation grid of the game scene model. On one hand, the navigation grid to be edited can be any polygon, the problem of imperfect cutting which cannot be realized or realized by splicing is solved, and more accurate functions can be further realized; on the other hand, the editing mode is more automatic, unified modification and hot updating are facilitated, and the input labor cost and time cost are reduced.)

1. A method for processing navigation data, the method comprising:

acquiring an initial navigation grid of a game scene model, and acquiring target position information of a click operation acting on the initial navigation grid;

determining a navigation grid to be edited in the initial navigation grid according to the target position information, and receiving an editing function instruction aiming at the navigation grid to be edited;

and editing the navigation grid to be edited according to the editing function instruction to obtain a target navigation grid so as to store the target navigation grid of the game scene model.

2. The method for processing navigation data according to claim 1, wherein the obtaining of target position information of a click operation acting on the initial navigation grid comprises:

acquiring grid data of the initial navigation grid, and extracting target grid data in the grid data;

and converting the target grid data to obtain data to be processed, and determining target position information of the click operation acting on the initial navigation grid according to the data to be processed.

3. The method for processing navigation data according to claim 2, wherein the determining target position information of the click operation acting on the initial navigation grid according to the data to be processed comprises:

acquiring position information of a click operation acting on the initial navigation grid, and performing ray detection on the initial navigation grid according to the position information;

and determining the target position information of the clicking operation according to the ray detection result and the data to be processed.

4. The method for processing navigation data according to claim 1, wherein the determining a navigation grid to be edited in the initial navigation grid according to the target position information comprises:

judging whether the click operation acts on the interior of the initial navigation grid or not according to the target position information;

and if the clicking operation acts on the interior of the initial navigation grid, determining the initial navigation grid as a navigation grid to be edited.

5. The method of processing navigation data of claim 4, further comprising:

dividing the game scene model to generate a plurality of divided blocks;

determining the relationship of the plurality of partitioned blocks by using a cross detection algorithm to generate a quadtree; wherein the target location information is stored in the quad tree.

6. The method for processing navigation data according to claim 1, wherein the editing function command comprises: split functional instructions, add functional instructions, modify functional instructions, and remove functional instructions.

7. The method for processing navigation data according to claim 1, wherein the saving of the target navigation grid of the game scene model comprises:

storing the target navigation grid of the game scene model according to a target format; wherein the object format comprises a py format.

8. An apparatus for processing navigation data, comprising:

the information acquisition module is configured to acquire an initial navigation grid of a game scene model and acquire target position information of a click operation acting on the initial navigation grid;

the instruction receiving module is configured to determine a navigation grid to be edited in the initial navigation grid according to the target position information and receive an editing function instruction aiming at the navigation grid to be edited;

and the grid editing module is configured to edit the navigation grid to be edited according to the editing function instruction to obtain a target navigation grid so as to store the target navigation grid of the game scene model.

9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of processing navigation data according to any one of claims 1 to 7.

10. An electronic device, comprising:

a processor;

a memory for storing executable instructions of the processor;

wherein the processor is configured to perform the method of processing navigation data of any one of claims 1-7 via execution of the executable instructions.

Technical Field

The present disclosure relates to the field of data processing technologies, and in particular, to a navigation data processing method, a navigation data processing apparatus, a computer-readable storage medium, and an electronic device.

Background

In games, the game scene is often required to be divided into regions to realize different functions. For example, when a certain room section is entered, the alert level of a Non-Player Character (NPC) is raised, and the efficiency of the basic function is required to be high and flexible configuration is required. Circular and rectangular flip-flops are commonly used, which is simple and well understood by both developers and planners, and thus is widely used.

However, since the shape of the division is fixed, seamless cutting of the entire game map cannot be realized, and automation cannot be realized. Especially, when a large map is divided, the time is very long, and errors are easy to occur.

In view of the above, there is a need in the art to develop a new navigation data processing method and apparatus.

It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.

Disclosure of Invention

The present disclosure is directed to a method for processing navigation data, a device for processing navigation data, a computer-readable storage medium, and an electronic device, so as to overcome the problems of low cutting accuracy and high labor cost due to the limitations of the related art, at least to some extent.

Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.

According to a first aspect of the embodiments of the present invention, there is provided a method for processing navigation data, the method including: acquiring an initial navigation grid of a game scene model, and acquiring target position information of a click operation acting on the initial navigation grid;

determining a navigation grid to be edited in the initial navigation grid according to the target position information, and receiving an editing function instruction aiming at the navigation grid to be edited;

and editing the navigation grid to be edited according to the editing function instruction to obtain a target navigation grid so as to store the target navigation grid of the game scene model.

In an exemplary embodiment of the present invention, the obtaining of the target position information of the click operation acting on the initial navigation grid includes:

acquiring grid data of the initial navigation grid, and extracting target grid data in the grid data;

and converting the target grid data to obtain data to be processed, and determining target position information of the click operation acting on the initial navigation grid according to the data to be processed.

In an exemplary embodiment of the present invention, the determining, according to the data to be processed, target position information of a click operation acting on the initial navigation grid includes:

acquiring position information of a click operation acting on the initial navigation grid, and performing ray detection on the initial navigation grid according to the position information;

and determining the target position information of the clicking operation according to the ray detection result and the data to be processed.

In an exemplary embodiment of the present invention, the determining a navigation grid to be edited in the initial navigation grid according to the target position information includes:

judging whether the click operation acts on the interior of the initial navigation grid or not according to the target position information;

and if the clicking operation acts on the interior of the initial navigation grid, determining the initial navigation grid as a navigation grid to be edited.

In an exemplary embodiment of the invention, the method further comprises:

dividing the game scene model to generate a plurality of divided blocks;

determining the relationship of the plurality of partitioned blocks by using a cross detection algorithm to generate a quadtree; wherein the target location information is stored in the quad tree.

In an exemplary embodiment of the invention, the edit function instruction includes: split functional instructions, add functional instructions, modify functional instructions, and remove functional instructions.

In an exemplary embodiment of the invention, the target navigation grid storing the game scene model includes:

storing the target navigation grid of the game scene model according to a target format; wherein the object format comprises a py format.

According to a second aspect of the embodiments of the present invention, there is provided a navigation data processing apparatus, including: the information acquisition module is configured to acquire an initial navigation grid of a game scene model and acquire target position information of a click operation acting on the initial navigation grid;

the instruction receiving module is configured to determine a navigation grid to be edited in the initial navigation grid according to the target position information and receive an editing function instruction aiming at the navigation grid to be edited;

and the grid editing module is configured to edit the navigation grid to be edited according to the editing function instruction to obtain a target navigation grid so as to store the target navigation grid of the game scene model.

According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus including: a processor and a memory; wherein the memory has stored thereon computer readable instructions which, when executed by the processor, implement a method of processing navigation data in any of the above exemplary embodiments.

According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of processing navigation data in any of the above-described exemplary embodiments.

As can be seen from the foregoing technical solutions, the navigation data processing method, the navigation data processing apparatus, the computer storage medium and the electronic device in the exemplary embodiment of the present disclosure have at least the following advantages and positive effects:

in the method and the device provided by the exemplary embodiment of the disclosure, the navigation grid to be edited in the game scene model is edited through the editing function instruction. On one hand, the navigation grid to be edited can be any polygon, so that the problem of imperfect cutting which cannot be realized or realized by splicing is solved, and more accurate functions can be further realized; on the other hand, the editing mode is more automatic, unified modification and hot updating are facilitated, and the input labor cost and time cost are reduced.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.

Fig. 1 schematically illustrates a flow chart of a method of processing navigation data in an exemplary embodiment of the present disclosure;

fig. 2 schematically illustrates a flow chart of a method of acquiring target location information in an exemplary embodiment of the present disclosure;

fig. 3 schematically illustrates a flow chart of a method of further obtaining target location information in an exemplary embodiment of the present disclosure;

FIG. 4 schematically illustrates a flow chart of a method of determining a navigation grid to be edited in an exemplary embodiment of the present disclosure;

FIG. 5 schematically illustrates a flow chart of a method of saving target location information in a quadtree according to an exemplary embodiment of the present disclosure;

FIG. 6 is a schematic diagram illustrating an interface for acquiring an initial navigation grid in an application scenario according to an exemplary embodiment of the present disclosure;

FIG. 7 schematically illustrates an interface diagram of an initial navigation grid in a bottom-right scenario in an exemplary embodiment of the present disclosure;

FIG. 8 is a schematic interface diagram illustrating an editing function instruction in an application scenario in an exemplary embodiment of the present disclosure;

FIG. 9 is a schematic illustration of an interface for simultaneously selecting two regions in an exemplary embodiment of the disclosure;

FIG. 10 is a schematic interface diagram illustrating a split function instruction in an application scenario according to an exemplary embodiment of the disclosure;

FIG. 11 is a schematic interface diagram illustrating an instruction for adding a function in an application scenario in an exemplary embodiment of the disclosure;

FIG. 12 is a schematic interface diagram illustrating modification of a function instruction in an application scenario according to an exemplary embodiment of the disclosure;

fig. 13 is a schematic structural diagram of a navigation data processing device in an exemplary embodiment of the present disclosure;

fig. 14 schematically illustrates an electronic device for implementing a processing method of navigation data in an exemplary embodiment of the present disclosure;

fig. 15 schematically illustrates a computer-readable storage medium for implementing a processing method of navigation data in an exemplary embodiment of the present disclosure.

Detailed Description

Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.

The terms "a," "an," "the," and "said" are used in this specification to denote the presence of one or more elements/components/parts/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first" and "second", etc. are used merely as labels, and are not limiting on the number of their objects.

Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.

In view of the problems in the related art, the present disclosure provides a method for processing navigation data, and fig. 1 shows a flowchart of the method for processing navigation data, and as shown in fig. 1, the method for processing navigation data at least includes the following steps:

and S110, acquiring an initial navigation grid of the game scene model, and acquiring target position information of the click operation acting on the initial navigation grid.

And S120, determining the navigation grid to be edited in the initial navigation grid according to the target position information, and receiving an editing function instruction aiming at the navigation grid to be edited.

And S130, editing the navigation grid to be edited according to the editing function instruction to obtain a target navigation grid so as to store the target navigation grid of the game scene model.

In an exemplary embodiment of the present disclosure, the navigation grid to be edited in the game scene model is edited by an editing function instruction. On one hand, the navigation grid to be edited can be any polygon, so that the problem of imperfect cutting which cannot be realized or realized by splicing is solved, and more accurate functions can be further realized; on the other hand, the editing mode is more automatic, unified modification and hot updating are facilitated, and the input labor cost and time cost are reduced.

The following describes each step of the navigation data processing method in detail.

In step S110, an initial navigation grid of the game scene model is acquired, and target position information of a click operation applied to the initial navigation grid is acquired.

In an exemplary embodiment of the present disclosure, the game scene model may be an object to which a scene within a game is scaled and is an animated building model of the scene created by a designer for the game. And the initial navigation grid of the game scene model is a triangular or polygonal grid marked with a walkable area and made for automatically searching the path of the network game role.

Specifically, the method can be implemented based on an open source project Recast, and the project generates an initial navigation grid (NavMesh) through the steps of voxelization, region generation, contour generation, polygon grid generation, height detail generation and the like of the grid (Mesh).

After obtaining the initial navigation grid, the user may apply a click operation on the initial navigation grid to process the initial navigation grid corresponding to the click operation. Therefore, the target position information of the click operation can be acquired. The target position information may be coordinate information in the initial navigation grid, or may be other information representing a position, which is not particularly limited in this exemplary embodiment.

In an alternative embodiment, fig. 2 shows a flowchart of a method for obtaining target location information, and as shown in fig. 2, the method at least includes the following steps: in step S210, mesh data of the initial navigation mesh is acquired, and target mesh data in the mesh data is extracted.

Since data of an initial navigation grid is stored within a structure, the structure can be acquired as corresponding grid data. Also, to reduce the workload, useful information may be extracted in the mesh data as target mesh data.

In step S220, the target mesh data is converted to obtain data to be processed, so as to determine target position information of the click operation acting on the initial navigation mesh according to the data to be processed.

After the target mesh data is obtained, the target mesh data conversion format may be stored in a new structural body, that is, the data to be processed is obtained.

In an alternative embodiment, fig. 3 shows a schematic flow chart of a method for further obtaining target location information, and as shown in fig. 3, the method at least includes the following steps: in step S310, position information of the click operation applied to the initial navigation grid is acquired, and ray detection is performed on the initial navigation grid according to the position information.

The position information is information directly applied to the game scene model by the click operation. In order to make the target position information fit the ground better, the corresponding target point on the ground can be detected by rays from the click operation action point represented by the position information to the ground, namely, the coordinate of the click operation action point is reduced to the coordinate of the point which is intersected with the ground.

In step S320, target position information of the click operation is determined according to the ray detection result and the data to be processed.

After the ray detection result, that is, the coordinates of the target point on the ground and the data to be processed obtained by the conversion processing are obtained, the target position information of the click operation can be determined. The target position information characterizes the target point on the ground and is represented in the form of data to be processed.

In the exemplary embodiment, the target position information is determined through conversion processing and ray detection, the determination mode is accurate and feasible, the whole game scene model is made to be more fit with the ground, and the effect is better.

In step S120, a navigation grid to be edited is determined in the initial navigation grid according to the target position information, and an editing function instruction for the navigation grid to be edited is received.

In an exemplary embodiment of the present disclosure, in order to determine the navigation grid to be edited, which is acted by the click operation, the determination may be performed according to the target position information of the click operation.

In an alternative embodiment, fig. 4 shows a flow diagram of a method of determining a navigation grid to be edited, which method comprises at least the following steps, as shown in fig. 4: in step S410, it is determined whether the click operation is performed within the initial navigation mesh based on the target position information.

Specifically, the PNPoly algorithm may be used to determine whether the click operation acts inside the initial navigation grid of the scene image. The PNPoly algorithm is to lead out a horizontal ray from a point to be measured represented by target position information of click operation and calculate the number of intersection points of the ray and a polygon representing an initial navigation grid. The PNPoly algorithm works for both convex and concave polygons. In addition, other algorithms may be used for determination, and the present exemplary embodiment is not particularly limited thereto.

In step S420, if the click operation is performed inside the initial navigation grid, it is determined that the initial navigation grid is the navigation grid to be edited.

For example, when a horizontal ray is led out from the point to be measured, the number of points intersecting with the initial navigation grid is 5, so that it is determined that the click operation acts on the inside of the initial navigation grid, and the initial navigation grid is further determined to be the navigation grid to be edited.

And a horizontal ray is led out from the point to be measured, and the number of the points which are intersected with the initial navigation grid is 4, so that the click operation is judged to act on the outer part of the initial navigation grid, and the initial navigation grid is not the navigation grid to be edited.

In the exemplary embodiment, the navigation grid to be edited in the game scene model can be determined through the target position information of the click operation, the determination mode is simple and accurate, and the calculation amount of the algorithm can be greatly simplified.

Furthermore, in order to reduce the amount of computation and improve the execution efficiency of determining the navigation grid to be edited, the position information in the game scene model may be stored in the quadtree.

In an alternative embodiment, fig. 5 is a flow chart illustrating a method for storing target location information in a quadtree, and as shown in fig. 5, the method at least includes the following steps: in step S510, the game scene model is divided into a plurality of divided blocks.

The bounding box corresponding to the game scene model can be equally divided into four equal parts from the central point according to the space coordinate system of the game scene model. Each aliquot may be a three-dimensional small space. In addition, the space may be a two-dimensional space according to the division. The coordinate range of each block can be determined according to the spatial coordinate system. In addition, the bounding box of the game scene model may be divided according to preset length and width thresholds, so as to obtain a plurality of blocks with equal length or a plurality of blocks with equal width, or blocks with equal length and width. Furthermore, the four subspaces generated in the first step are traversed in a recursion mode, and then the subspaces are divided into four equal parts until the recursion times reach a specified value, and a plurality of final divided blocks are generated.

In step S520, a plurality of partition block relationships are determined to generate a quadtree. Wherein the quad-tree stores therein the target location information. In order to generate a quadtree for a plurality of divided blocks that have been divided, a relationship between different divided blocks may be determined using a cross detection algorithm. An algorithm commonly adopted for collision detection in three-dimensional game development is an axis Aligned rectangular bounding Box (AABB for short) packing Box method, and the basic idea is to completely wrap a 3D object by using a cube or a sphere and then calculate whether collision occurs according to related information such as the distance and the position of the packing Box. Therefore, whether a collision occurs between two divided blocks, that is, whether they intersect, can be determined by the AABB cross detection algorithm. When two partitioned blocks intersect, it can be determined that the two blocks belong to the same branch on the quadtree to generate the quadtree.

At this time, the quadtree may be a quadtree that preserves a spatial structure of the game scene model. The quadtree is a kind of "tree" structure data, there are four sub-blocks on each node, which means that the current space is divided into four sub-spaces, and the process is repeated until a certain depth is reached or a certain requirement is met. Specifically, the size of the whole game scene model can be determined through the root node of the quadtree, for example, the coordinates of the endpoint of the game scene model; the non-leaf nodes of the quadtree may include end point coordinates of the block; the leaf nodes of the quadtree may store the area list, the recursion depth, the index of the current subspace, the subspace list of the current space, the position information of the polygon, and the like included in the subspace of the block, which is not particularly limited in this exemplary embodiment.

In the exemplary embodiment, the target position information in the game scene model is linearized through the quadtree, so that query and search are facilitated, and the position of the navigation grid to be edited can be determined more quickly.

After the navigation grid to be edited is determined according to the clicking operation of the user, the user can send an editing function instruction for the navigation grid to be edited.

In an alternative embodiment, editing the function instructions includes splitting the function instructions, adding the function instructions, modifying the function instructions, and removing the function instructions.

The division function instruction can be an instruction for performing division processing on the navigation grid to be edited to generate a plurality of navigation grids; the add function instruction may be an instruction to add a navigation grid associated with the navigation grid to be edited; the modification function instruction can be an instruction for editing the navigation grid to be edited; the remove function instruction may be an instruction to remove the navigation grid to be edited.

In step S130, the navigation grid to be edited is edited according to the editing function instruction to obtain the target navigation grid, so as to save the target navigation grid of the game scene model.

In an exemplary embodiment of the present disclosure, after receiving the editing function instruction, the navigation grid to be edited may be correspondingly edited, and the navigation grid generated after editing is determined as the target navigation grid and saved.

In an alternative embodiment, the target navigation grid of the game scene model is stored in a target format. The object format includes a py format.

Py format is an abbreviation for Python saved files. Python is a cross-platform computer programming language, a high-level scripting language that combines interpretive, compiled, interactive, and object-oriented programming. When the target navigation grid is stored in the py format, the target navigation grid can be conveniently processed and edited by subsequent developers, and more functions can be accurately realized.

The following describes the processing method of navigation data in the embodiment of the present disclosure in detail with reference to an application scenario.

Fig. 6 shows a schematic interface diagram of obtaining an initial navigation grid in an application scenario, as shown in fig. 6, a Solo Mesh control 611 in a Sample control 610 in the interface is selected, and further, a required game scenario model file is selected in an Input Mesh control 620. The format of the model file is.obj. In addition, the build control can be used for generating initial grid data, and the Tools control can be used for selecting the Creat Areas control, and then the initial navigation grid can be edited.

The original game scene model is an obj model file, and the generated initial navigation grid can be a navmesh format file.

Fig. 7 shows an interface diagram of an initial navigation grid in a game scene, and as shown in fig. 7, each wire frame is a different initial navigation grid.

The navmesh formatted file is read from the linked list to be stored in the vector array and to customize the data structure, AreaData. Wherein, v _ areas stores nodes of all initial navigation grids, nareas is the number of all initial navigation grids, color is the used color library for displaying custom colors when drawing regions, and b _ min and b _ max are the minimum coordinate and the maximum coordinate of the whole game scene model space.

Furthermore, traversing the data linked list of the navmesh, converting each node data into a self-defined data structure, and performing subsequent editing on the converted data to be processed.

Fig. 8 is a schematic interface diagram illustrating an editing function instruction in an application scenario, and as shown in fig. 8, the load area file control 810 may load a saved data file, and the select area control 821 or the multi-select area control 822 may select or select more initial navigation grids. In addition, fig. 8 also includes a control for splitting the function instruction, i.e., split area control 830; a control for adding a function instruction, namely an add new area control 840; a control for modifying the function command, i.e., an exit control 850; the control of the function instruction, i.e. remove area control 860, is removed.

Fig. 9 shows an interface diagram of selecting two areas simultaneously, and as shown in fig. 9, two initial navigation grids can be queried as the navigation grid to be edited by using the PNPoly algorithm.

The split area control 830 is a control that splits the function instructions.

Fig. 10 is a schematic diagram of an interface of a splitting function instruction in an application scene, as shown in fig. 10, a perpendicular intersection point of an edge closest to the target position information of the click operation is found, and a navigation grid to be edited is split through the two points.

The add new area control 840 is a control to add a function instruction.

Fig. 11 is a schematic diagram of an interface for adding a function instruction in an application scene, and as shown in fig. 11, the function instruction is automatically adsorbed to a vertex coordinate when the distance between the function instruction and the vertex of the navigation mesh to be edited is short. The adsorption function means that target position information of click operation and the distance of a navigation grid to be edited are searched, and a certain point is clicked within a preset distance; if the point is not clicked, judging a perpendicular line to the navigation grid edge to be edited, calculating an intersection point with the shortest distance, and regarding the intersection point as target position information of the click operation; the point and edge not clicked is the click position of the mouse. For example static areas like a grass mat may be used.

The exit control 850 is a control that modifies the function instructions.

Fig. 12 is a schematic diagram of an interface for modifying a function instruction in an application scenario, where as shown in fig. 12, a point in a navigation grid to be edited is clicked, that is, a function of an upper adsorption point, and then another point is clicked, that is, the original point on the navigation grid to be edited is moved to a mouse click position, so that the shape of the original navigation grid to be edited is changed.

remove area control 860 is a control that removes a function instruction.

The remove area control 860 can remove the area added by self-definition, and the area generated based on navmesh cannot be removed but can be segmented, so that the boundary is prevented from appearing.

After the target navigation grid is obtained by editing the navigation grid to be edited according to various editing function instructions, the target navigation grid of the game scene may be saved by using the save all to file control 870 in fig. 8. For example, it may be saved as a file in the. py format.

In the navigation data processing method under the application scene, the navigation grid to be edited in the game scene model is edited through the editing function instruction. On one hand, the navigation grid to be edited can be any polygon, so that the problem of imperfect cutting which cannot be realized or realized by splicing is solved, and more accurate functions can be further realized; on the other hand, the editing mode is more automatic, unified modification and hot updating are facilitated, and the input labor cost and time cost are reduced.

Furthermore, in an exemplary embodiment of the present disclosure, a processing device of navigation data is also provided. Fig. 13 is a schematic structural diagram of a navigation data processing apparatus, and as shown in fig. 13, a navigation data processing apparatus 1300 may include: an information acquisition module 1310, an instruction receiving module 1320, and a mesh editing module 1330. Wherein:

an information obtaining module 1310 configured to obtain an initial navigation grid of the game scene model, and obtain target position information of a click operation acting on the initial navigation grid; an instruction receiving module 1320, configured to determine a navigation grid to be edited in the initial navigation grid according to the target position information, and receive an editing function instruction for the navigation grid to be edited; and a mesh editing module 1330 configured to edit the navigation mesh to be edited according to the editing function instruction to obtain a target navigation mesh, so as to save the target navigation mesh of the game scene model.

The specific details of the navigation data processing apparatus 1300 have been described in detail in the corresponding navigation data processing method, and therefore are not described herein again.

It should be noted that although in the above detailed description several modules or units of the processing device 1300 of navigation data are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.

In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

An electronic device 1400 according to such an embodiment of the invention is described below with reference to fig. 14. The electronic device 1400 shown in fig. 14 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.

As shown in fig. 14, the electronic device 1400 is embodied in the form of a general purpose computing device. The components of the electronic device 1400 may include, but are not limited to: the at least one processing unit 1410, the at least one memory unit 1420, the bus 1430 that connects the various system components (including the memory unit 1420 and the processing unit 1410), and the display unit 1440.

Wherein the storage unit stores program code that is executable by the processing unit 1410, such that the processing unit 1410 performs steps according to various exemplary embodiments of the present invention described in the above section "exemplary methods" of the present specification.

The storage unit 1420 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)1421 and/or a cache memory unit 1422, and may further include a read only memory unit (ROM) 1423.

Storage unit 1420 may also include a program/utility 1424 having a set (at least one) of program modules 1425, such program modules 1425 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.

Bus 1430 may be any type of bus structure including a memory cell bus or memory cell controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

The electronic device 1400 can also communicate with one or more external devices 1600 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1400, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1400 to communicate with one or more other computing devices. Such communication can occur via an input/output (I/O) interface 1450. Also, the electronic device 1400 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 1460. As shown, the network adapter 1440 communicates with other modules of the electronic device 1400 via the bus 1430. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.

Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when said program product is run on the terminal device.

Referring to fig. 15, a program product 1500 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于对弈的智能鉴别系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类