Axis point drawing method and device, storage medium and computer equipment
Through automated and intelligent pivot point drawing methods, visual operation tools are used to draw pivot points in batches, solving the problems of single plant performance and cumbersome manual drawing in the game, improving efficiency and accuracy.
Patent Information
- Application Number
- CN202310834930.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, the performance of simulated plants in the wind in the game is single and not realistic enough. Moreover, since the drawing of Pivot pivot points requires a large amount of manual resources, the process is cumbersome and prone to errors, low efficiency, and it is difficult to accurately draw complex rules.
Provide a pivot point drawing method and device, batch drawing pivot points through automated and intelligent methods, use visual operation tools to determine target vertices and candidate pivot points, select appropriate pivot point determination mode, generate pivot point information, and realize pivot points batch and automated drawing.
It greatly reduces the workload of manually drawing pivot points, improves pivot points drawing efficiency and accuracy, simplifies the drawing process of complex models, and reduces the time for manual inspection.
Smart Images

Figure CN119273801A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of axis point drawing, and in particular to an axis point drawing method and device, a storage medium, and a computer device. Background Art
[0002] In order to improve the game graphics, some dynamic elements are often set in the game to make the game more vivid. For example, there are usually many virtual plants in the game scene. In order to improve the sense of reality, some games use sine functions to simply disturb and bend the vertices of the model to create the illusion that the plants are blown by the wind. However, this method can only simulate the disturbance effect of branches and leaves, and the effect is relatively simple and not realistic enough. At present, some games simulate the rotation and scaling of objects by setting the Pivot axis point, so as to achieve the performance of plants in a real wind field. Pivot is the position of the local coordinate origin of the object in the world coordinate, which is determined by the model maker when making it, and usually needs to be manually set / drawn. In the case of a large number of different types of plants, this method will consume a lot of art human resources.
[0003] In addition, since most Pivots are drawn manually, the drawing process is not only extremely cumbersome and time-consuming, wasting manpower, but also often resulting in drawing errors and inconvenience in modification. The more complex the drawing rules, the lower the efficiency of manual drawing, and the inspection is also troublesome. Summary of the invention
[0004] In view of this, the present application provides an axis point drawing method and device, storage medium, and computer equipment, which can automatically and intelligently perform batch drawing of axis points, greatly reducing the workload of manual drawing of axis points and improving the efficiency and accuracy of axis point drawing.
[0005] According to one aspect of the present application, a method for drawing an axis point is provided, the method comprising:
[0006] Determine a target vertex set to be drawn among the vertices of the drawn object, and determine a candidate axis point set of the target vertex set, wherein the target vertex set includes at least one target vertex, and the candidate axis point set includes at least one candidate axis point;
[0007] Selecting a target axis point determination mode, and determining a target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set;
[0008] According to the target axis point, the axis point information corresponding to the target vertex is determined.
[0009] According to another aspect of the present application, there is provided an axis point drawing device, the device comprising:
[0010] A drawing point determination module, used to determine a target vertex set to be drawn among the vertices of the drawn object, and determine a candidate axis point set of the target vertex set, wherein the target vertex set includes at least one target vertex, and the candidate axis point set includes at least one candidate axis point;
[0011] An axis point determination module, used to select a target axis point determination mode, and determine a target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set;
[0012] The information determination module is used to determine the axis point information corresponding to the target vertex according to the target axis point.
[0013] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned axis point drawing method is implemented.
[0014] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned axis point drawing method when executing the program.
[0015] By means of the above technical solution, the present application provides an axis point drawing method and device, storage medium, and computer equipment, which can batch select target vertices that need to be drawn for axis points and candidate axis points based on which the drawing is based, so as to batch draw the target axis points corresponding to each target vertex according to the selected target axis point determination mode, and determine the axis point information corresponding to the target vertex based on the target axis points corresponding to each target vertex. The present application can automatically and intelligently draw axis points in batches, greatly reducing the workload of manually drawing axis points and improving the efficiency and accuracy of axis point drawing.
[0016] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A schematic diagram of a flow chart of an axis point drawing method provided in an embodiment of the present application is shown;
[0019] Figure 2A schematic diagram showing a flow chart of another axis point drawing method provided in an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of the structure of an axis point drawing device provided in an embodiment of the present application is shown;
[0021] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0023] In this embodiment, a method for drawing an axis point is provided, such as Figure 1 As shown, the method includes:
[0024] Step 101, determining a target vertex set to be drawn among the vertices of the drawn object, and determining a candidate axis point set of the target vertex set, wherein the target vertex set includes at least one target vertex, and the candidate axis point set includes at least one candidate axis point.
[0025] The axis point drawing method provided in the embodiment of the present application can be implemented based on an axis point drawing tool that can perform visual operations. The drawing personnel can use the display interface of the visual operation tool and the axis point drawing related functions provided by the tool to break through the drawing method of the traditional model axis point channel. They only need to use the tool to select functions to achieve batch drawing of axis points in a simple and convenient way.
[0026] First, load one or more models that need to be drawn with axis points, and display the vertices contained in the loaded models through a visual interface. The axis point drawing tool provides a vertex selection function. The drawing staff can directly select one or more objects as the drawn objects, and all the vertices contained in the drawn objects as target vertices. One object can be a complete model or a part of a model. The drawing staff can also manually select the target vertices one by one or in batches from the vertices displayed in the interface. The selection of candidate axis points is similar to the selection of target vertices mentioned above, so it will not be repeated here.
[0027] Step 102 : Select a target axis point determination mode, and determine a target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set.
[0028] Secondly, the axis point drawing tool can also provide a variety of axis point determination modes for drawing personnel to choose from. The axis point determination modes can specifically include a unique axis point determination mode, a nearest axis point determination mode, and a nearest connected point determination mode. In addition, the axis point drawing tool can also provide a mode automatic matching function, which automatically matches the appropriate mode in the multiple axis point determination modes according to the selected object to be drawn. For example, the corresponding target axis point determination mode is matched according to the model type corresponding to the object to be drawn. For example, if the model is a tree model, the tool can automatically match the corresponding target axis point determination mode to the nearest axis point determination mode. Furthermore, based on the target axis point determination mode and the candidate axis points, the target axis point of each target vertex is determined. The target axis point can be a candidate axis point or other point determined after calculation based on the candidate axis point.
[0029] Step 103: Determine the axis point information corresponding to the target vertex according to the target axis point.
[0030] Finally, after determining the target pivot point corresponding to each target vertex, the pivot point information of each target vertex is generated, so as to subsequently use the pivot point information to generate the animation effect of the drawn object.
[0031] By applying the technical solution of this embodiment, the target vertices that need to be drawn for axis points and the candidate axis points based on which the drawing is based can be selected in batches, so that the target axis points corresponding to each target vertex can be drawn in batches according to the selected target axis point determination mode, and the axis point information corresponding to the target vertex can be determined based on the target axis points corresponding to each target vertex. The embodiment of the present application can realize batch and automatic drawing of axis points, greatly reducing the workload of manual drawing of axis points and improving the efficiency and accuracy of axis point drawing.
[0032] In the embodiment of the present application, in addition to providing multiple optional axis point determination modes, a constraint function for axis point drawing may also be provided. Optionally, step 102 includes:
[0033] Step 102-1, when an axis point connectivity constraint instruction is received, a target axis point corresponding to each target vertex is determined based on the target axis point determination mode and candidate axis points having connectivity with each target vertex.
[0034] Step 102-2, when an element unique constraint instruction is received, the initial axis point corresponding to the target vertex is determined based on the target axis point determination mode and the candidate axis point set, and the target vertices with connectivity are divided into the same vertex group based on the connectivity between the target vertices; for each vertex group, the distance between each target vertex in the vertex group and the corresponding initial axis point is counted, and the initial axis point corresponding to the minimum distance is used as the target axis point corresponding to each target vertex in the vertex group.
[0035] In this embodiment, the axis point drawing tool can provide an axis point connectivity constraint function. When the drawing personnel select this function, that is, when the axis point drawing tool receives the axis point connectivity constraint instruction, when the axis point calculation is performed on the target vertex, the range of the candidate axis points needs to be limited. Specifically, when the axis point calculation is performed on a certain target vertex, the part of the candidate axis points that has connectivity with the target vertex is first screened out, so that only this part of the candidate axis points is used as the basis, and the axis point calculation is performed on the target vertex in combination with the target axis point determination mode. Among them, whether there is connectivity between the candidate axis point and the target vertex is determined by judging whether the candidate axis point and the target vertex are in the same element. If the two are in the same element, then the two are connected. For a model, a model can be an element, and a model can also be divided into multiple elements. Whether to divide the model into multiple elements depends on whether the parts of the model are relatively independent. For example, a tree model can include two elements: a trunk and branches.
[0036] The axis point drawing tool can also provide an element unique constraint function. When the drawing staff selects this function, that is, when the axis point drawing tool receives the element unique constraint instruction, it first calculates the axis points of the target vertices according to the target axis point determination mode and the candidate axis point set, and uses the axis point calculation results of each target vertex as the initial axis point of the target vertex, and then further performs secondary axis point calculation on the target vertex based on the initial axis point. Specifically, the target vertices with connectivity are divided into the same group to form one or more vertex groups. The element unique constraint function is used to ensure that the target axis point corresponding to the target vertex on each element is unique. After the target vertices on the same element (that is, the target vertices with connectivity) are divided into the same vertex group, for any vertex group, the distance between each target vertex in the group and its corresponding initial axis point is calculated, and the initial axis point with the smallest distance is taken as the target axis point of all target vertices in the entire vertex group, that is, the initial axis point corresponding to the smallest distance is taken as the unified target axis point corresponding to the vertex group.
[0037] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another axis point drawing method is provided, such as Figure 2 As shown, the method includes:
[0038] Step 201 , determining a target vertex set to be drawn among the vertices of the drawn object, and determining a candidate axis point set of the target vertex set, wherein the target vertex set includes at least one target vertex, and the candidate axis point set includes at least one candidate axis point.
[0039] Step 202 : Select a target axis point determination mode, wherein the target axis point determination mode includes any one of a unique axis point determination mode, a nearest axis point determination mode, and a nearest connected point determination mode.
[0040] Step 203, if the target axis point determination mode is the unique axis point determination mode, the center point corresponding to each candidate axis point in the candidate axis point set is determined, and the candidate axis point closest to the center point is taken as the unified target axis point of each target vertex.
[0041] In this embodiment, the unique axis point determination mode refers to a calculation mode in which only a unique target axis point is calculated for all target vertices. If the drawing personnel selects or the tool automatically matches the unique axis point determination mode, then in this mode, the center points corresponding to all candidate axis points are calculated first, and the candidate axis point closest to the center point is taken as the unified target axis point corresponding to all target vertices.
[0042] Optionally, if the target axis point determination mode is a unique axis point determination mode, in another embodiment the axis point can also be determined in the following manner: determine the center point corresponding to each candidate axis point in the candidate axis point set, and use the center point as the unified target axis point for each target vertex.
[0043] Step 204: If the target axis point determination mode is the closest axis point determination mode, then the candidate axis point closest to each target vertex is selected as the target axis point of each target vertex.
[0044] In this embodiment, if the drawing staff selects or the tool automatically matches the nearest axis point determination mode, then in this mode, an independent axis point calculation is performed for each target vertex, and for each target vertex, the distance between the target vertex and each candidate axis point is calculated, and the candidate axis point with the closest distance is used as the target axis point of the target vertex.
[0045] Step 205, if the target axis point determination mode is the nearest connected point determination mode, then the candidate axis point closest to each target vertex is taken as the intermediate axis point of each target vertex, and the connected vertex closest to the intermediate axis point is taken from the connected vertices corresponding to each target vertex as the target axis point of each target vertex.
[0046] In this embodiment, if the drawing staff selects or the tool automatically matches the nearest axis point determination mode, then in this mode, the calculation method of the above-mentioned nearest axis point determination mode is first used to take the calculation result of each target vertex as the intermediate axis point, and then the intermediate axis point is adsorbed to the nearest connected vertex with the target vertex. Specifically, after the intermediate axis point is calculated, for any target vertex, the vertex that has connectivity with the target vertex (that is, is on the same element) is taken as the connected vertex of the target vertex, and the connected vertex closest to the intermediate axis point is taken, and the intermediate axis point is adsorbed to the connected vertex to obtain the final target axis point of the target vertex. Among them, if the distance between the intermediate axis point and multiple connected vertices is the same and the smallest, then one of the multiple connected vertices can be randomly selected, or the connected vertex with the smallest number can be directly selected as the final target axis point.
[0047] Optionally, the connected vertex closest to the intermediate axis point is taken from the connected vertices corresponding to each target vertex as the target axis point of each target vertex, including: for any target vertex, the target element where the target vertex is located is determined among the object elements contained in the drawn object, the vertex located on the target element is taken as the connected vertex corresponding to the target vertex, and the connected vertex closest to the intermediate axis point corresponding to the target vertex is taken as the target axis point of the target vertex.
[0048] In this embodiment, when determining the connected vertices corresponding to the target vertex, the object element where the target vertex is located can be determined first, that is, on which of the elements of the drawn object the target vertex is located, and all vertices on the object element where the target vertex is located are used as the connected vertices corresponding to the target vertex, and then subsequent calculations are performed.
[0049] Step 206, in response to the axis point check instruction, determine the selected target vertex to be checked, and display a virtual mapping object between the selected target vertex and the target axis point corresponding to the selected target vertex, wherein the virtual mapping object is used to show the corresponding relationship between the selected target vertex and the target axis point.
[0050] In this embodiment, the axis point drawing tool can also provide an axis point check function. The drawing staff can check some or all of the target vertices by selecting this function. The drawing staff can select the vertex to be checked by selecting a model, an element or directly selecting a target vertex. After determining the selected target vertex to be checked, the axis point drawing tool displays the selected target vertex, the target axis point corresponding to the selected target vertex, and the virtual mapping object between the selected target vertex and the corresponding target axis point. Each selected target vertex corresponds to a virtual mapping object. For example, the virtual mapping object can be a line with an arrow, the starting point of the line is the selected target vertex, and the arrow points to the corresponding target axis point, so that the drawing staff can check it conveniently.
[0051] Step 207, determining the axis point information format.
[0052] In this embodiment, after the drawing staff confirms that the axis point drawing is completed, the axis point drawing tool can automatically generate the axis point information corresponding to the target vertex, so as to save it and use it in the subsequent animation generation. Specifically, the axis point information can be generated according to the axis point information format selected by the drawing staff or automatically matched by the axis point drawing tool, and the axis point information can be saved in the corresponding format when it is subsequently saved.
[0053] Optionally, step 207 may further include: determining the object model size of the drawn object; if the object model size is smaller than a preset size, determining that the axis point information format is a vector format; if the object model size is greater than or equal to a preset size, determining that the axis point information format is a position format.
[0054] Among them, when the axis point drawing tool automatically matches the axis point information format, it can determine the axis point information format corresponding to each drawn object one by one based on the object model size corresponding to each drawn object. Specifically, the vector format has a better effect on preventing stretching when generating animations later, and the position format is more accurate for wind speed and noise sampling when generating animations later. When the model size is smaller than the preset size, it can be matched to the vector format, otherwise it can be matched to the position format.
[0055] Step 208, if the axis point information format is a vector format, then for each drawn object, based on the first target axis point corresponding to the first target vertex contained in the drawn object, determine the maximum distance between each first target axis point and the world coordinate origin, use the maximum distance as the maximum axis point distance of the drawn object, and determine the axis point information of each drawn object based on the maximum axis point distance of each drawn object and the first target axis point vector.
[0056] In this embodiment, for the vector format, the axis point information can be restored by the following two formulas:
[0057] float3 LocalPivotVector=(VertexColor.xyz*2.0–1.0)*
[0058] Model_MaxPivotDistance, and
[0059] PivotPositionWS=TransformVectorLocalToWorld(LocalPivotVector)+
[0060] WorldPosition,
[0061] Among them, VertexColor.xyz represents the XYZ coordinate value converted from the RGB color channel value of the vertex, Model_MaxPivotDistance represents the maximum pivot distance, and the maximum pivot distance of each drawn object is: the maximum distance between the first target pivot point corresponding to each first target vertex contained in the drawn object and the world coordinate origin, TransformVectorLocalToWorld(LocalPivotVector) represents the conversion of the pivot vector to the world coordinate, and WorldPosition represents the world coordinate origin position. Therefore, it is only necessary to save the maximum pivot distance and each first target pivot vector of the drawn object to ensure that the effect of each target vertex of the drawn object can be calculated later.
[0062] Step 209: If the axis point information format is a position format, then for each drawn object, an axis point cube model is generated based on the second target axis point corresponding to the second target vertex contained in the drawn object, the longest diagonal of the axis point cube model is taken as the axis point model size of the drawn object, and the shortest distance between the axis point cube model and the world coordinate origin is taken as the minimum axis point distance; based on the axis point model size corresponding to each drawn object, the minimum axis point distance and the second target axis point position, the axis point information of each drawn object is determined.
[0063] In this embodiment, for the vector format, the axis point information can be restored by the following two formulas:
[0064] float3 LocalPivot=VertexColor.xyz*Model_PivotPositionSize+
[0065] Model_PivotPositionMin, and
[0066] PivotPositionWS=TransformLocalToWorld(LocalPivot),
[0067] Among them, VertexColor.xyz represents the XYZ coordinate value converted from the RGB color channel value of the vertex, Model_PivotPositionSize represents the pivot point model size, when calculating the pivot point model size for each drawn object, a cube model including the second target pivot point is constructed based on the second target pivot points corresponding to each second target vertex contained in the drawing object as the pivot point model of the drawn object, so as to take the length of the longest diagonal of the pivot point model as the pivot point model size, Model_PivotPositionMin represents the minimum pivot point distance, which is the closest distance between the pivot point model corresponding to the drawn object and the world coordinate origin, and TransformVectorLocalToWorld(LocalPivot) represents the conversion of the pivot point position to the world coordinate. Therefore, it is only necessary to save the pivot point model size, the minimum pivot point distance and the second target pivot point positions of the drawn object to ensure that the effect of each target vertex of the drawn object can be calculated later.
[0068] In the embodiment of the present application, optionally, the method further includes: performing offset processing on the coordinates of the target vertex based on the axis point information corresponding to the target vertex.
[0069] In this embodiment, the axis point drawing tool can also provide an automatic repair function for repairing the vertex coordinates of the target vertex to ensure high data accuracy. Since the data of the axis point information is stored in the three channels R, G, and B of the color channel where the vertex is located, and by converting the values of R, G, and B to X, Y, and Z, and then through the above calculation, the value of the axis point information can be restored. The error in its accuracy is mainly due to the fact that the RGB of the vertex channel is an integer of 0 to 255, which will cause an error from floating point to integer during parsing. Therefore, in order to avoid the error from floating point to integer during subsequent parsing, the coordinates of the target vertex can be offset first to correct the error that will be generated later.
[0070] By applying the technical solution of this embodiment, after inputting the corresponding parameters according to the needs of the user, the information of the axis point channel can be automatically drawn, and the drawing results can be quickly previewed and checked, which can meet the needs of drawing axis point channels in most of the work, such as: drawing the axis point channel of grass, drawing the axis point channel of ordinary tree leaves, drawing the axis point channel of broad-leaved vegetation, drawing the axis point channel of vines, drawing the axis point channel of willow branches, etc. The drawing solution of this tool converts the previous manual drawing process into batch and automatic drawing, greatly reducing the time of manual inspection, and can draw different results for different types of models, greatly speeding up the efficiency of drawing.
[0071] Further, as Figure 1The specific implementation of the method, the embodiment of the present application provides an axis point drawing device, such as Figure 3 As shown, the device comprises:
[0072] A drawing point determination module, used to determine a target vertex set to be drawn among the vertices of the drawn object, and determine a candidate axis point set of the target vertex set, wherein the target vertex set includes at least one target vertex, and the candidate axis point set includes at least one candidate axis point;
[0073] An axis point determination module, used to select a target axis point determination mode, and determine a target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set;
[0074] The information determination module is used to determine the axis point information corresponding to the target vertex according to the target axis point.
[0075] Optionally, the target axis point determination mode includes any one of a unique axis point determination mode, a nearest axis point determination mode and a nearest connected point determination mode; the axis point determination module is further used to:
[0076] If the target axis point determination mode is the unique axis point determination mode, the center point corresponding to each candidate axis point in the candidate axis point set is determined, and the candidate axis point closest to the center point is taken as the unified target axis point of each target vertex;
[0077] If the target axis point determination mode is the closest axis point determination mode, then the candidate axis point closest to each target vertex is selected as the target axis point of each target vertex;
[0078] If the target axis point determination mode is the nearest connected point determination mode, the candidate axis point closest to each target vertex is taken as the intermediate axis point of each target vertex, and the connected vertex closest to the intermediate axis point is taken from the connected vertices corresponding to each target vertex as the target axis point of each target vertex.
[0079] Optionally, in another embodiment, if the target axis point determination mode is a unique axis point determination mode, the axis point determination module is further used to: determine the center point corresponding to each candidate axis point in the candidate axis point set, and use the center point as the unified target axis point of each target vertex.
[0080] Optionally, the axis point determination module is further used to:
[0081] For any target vertex, the target element where the target vertex is located is determined among the object elements contained in the drawn object, the vertex located on the target element is taken as the connected vertex corresponding to the target vertex, and the connected vertex closest to the intermediate axis point corresponding to the target vertex is taken as the target axis point of the target vertex.
[0082] Optionally, the axis point determination module is further used to:
[0083] When an axis point connectivity constraint instruction is received, a target axis point corresponding to each target vertex is determined based on the target axis point determination mode and the candidate axis points having connectivity with each target vertex;
[0084] When an element unique constraint instruction is received, the initial axis point corresponding to the target vertex is determined based on the target axis point determination mode and the candidate axis point set, and the target vertices with connectivity are divided into the same vertex group based on the connectivity between the target vertices; for each vertex group, the distance between each target vertex in the vertex group and the corresponding initial axis point is counted, and the initial axis point corresponding to the minimum distance is used as the target axis point corresponding to each target vertex in the vertex group.
[0085] Optionally, the device further comprises:
[0086] A checking module is used to determine the selected target vertex to be checked in response to an axis point checking instruction after selecting the target axis point corresponding to each target vertex in the candidate axis point set based on the target axis point determination mode, and display a virtual mapping object between the selected target vertex and the target axis point corresponding to the selected target vertex, wherein the virtual mapping object is used to show the corresponding relationship between the selected target vertex and the target axis point.
[0087] Optionally, the information determination module is further used to:
[0088] Determine the axis point information format;
[0089] If the axis point information format is a vector format, then for each drawn object, based on the first target axis point corresponding to the first target vertex contained in the drawn object, determine the maximum distance between each first target axis point and the world coordinate origin, use the maximum distance as the maximum axis point distance of the drawn object, and determine the axis point information of each drawn object based on the maximum axis point distance of each drawn object and the first target axis point vector;
[0090] If the axis point information format is a position format, then for each drawn object, an axis point cube model is generated based on the second target axis point corresponding to the second target vertex contained in the drawn object, the longest diagonal of the axis point cube model is taken as the axis point model size of the drawn object, and the shortest distance between the axis point cube model and the world coordinate origin is taken as the minimum axis point distance; based on the axis point model size corresponding to each drawn object, the minimum axis point distance and the second target axis point position, the axis point information of each drawn object is determined.
[0091] Optionally, the information determination module is further used to:
[0092] Determining the object model size of the drawn object;
[0093] If the size of the object model is smaller than a preset size, determining that the format of the axis point information is a vector format;
[0094] If the size of the object model is greater than or equal to the preset size, the axis point information format is determined to be a position format.
[0095] Optionally, the information determination module is further used to:
[0096] Based on the axis point information corresponding to the target vertex, the coordinates of the target vertex are offset.
[0097] It should be noted that for other corresponding descriptions of the functional units involved in the axial point drawing device provided in the embodiment of the present application, reference can be made to Figure 1 to Figure 2 The corresponding description in the method will not be repeated here.
[0098] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 4 As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0099] Those skilled in the art will understand that Figure 4The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0100] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0101] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0102] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0104] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0105] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for drawing an axis point, characterized in that: The method comprises: Determine a target vertex set to be drawn among the vertices of the drawn object, and determine a candidate axis point set of the target vertex set, wherein the target vertex set includes at least one target vertex, and the candidate axis point set includes at least one candidate axis point; Selecting a target axis point determination mode, and determining a target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set; According to the target axis point, the axis point information corresponding to the target vertex is determined.
2. The method according to claim 1, characterized in that The target axis point determination mode includes any one of a unique axis point determination mode, a nearest axis point determination mode, and a nearest connected point determination mode; and determining the target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set includes: If the target axis point determination mode is the unique axis point determination mode, the center point corresponding to each candidate axis point in the candidate axis point set is determined, and the candidate axis point closest to the center point is taken as the unified target axis point of each target vertex; If the target axis point determination mode is the closest axis point determination mode, then the candidate axis point closest to each target vertex is selected as the target axis point of each target vertex; If the target axis point determination mode is the nearest connected point determination mode, the candidate axis point closest to each target vertex is taken as the intermediate axis point of each target vertex, and the connected vertex closest to the intermediate axis point is taken from the connected vertices corresponding to each target vertex as the target axis point of each target vertex.
3. The method according to claim 2, characterized in that The method of selecting the connected vertices closest to the intermediate axis point from the connected vertices corresponding to each target vertex as the target axis points of each target vertex includes: For any target vertex, the target element where the target vertex is located is determined among the object elements contained in the drawn object, the vertex located on the target element is taken as the connected vertex corresponding to the target vertex, and the connected vertex closest to the intermediate axis point corresponding to the target vertex is taken as the target axis point of the target vertex.
4. The method according to any one of claims 1 to 3, characterized in that The step of determining the target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set includes: When an axis point connectivity constraint instruction is received, a target axis point corresponding to each target vertex is determined based on the target axis point determination mode and the candidate axis points having connectivity with each target vertex; When an element unique constraint instruction is received, the initial axis point corresponding to the target vertex is determined based on the target axis point determination mode and the candidate axis point set, and the target vertices with connectivity are divided into the same vertex group based on the connectivity between the target vertices; for each vertex group, the distance between each target vertex in the vertex group and the corresponding initial axis point is counted, and the initial axis point corresponding to the minimum distance is used as the target axis point corresponding to each target vertex in the vertex group.
5. The method according to claim 4, characterized in that After selecting the target axis point corresponding to each target vertex in the candidate axis point set based on the target axis point determination mode, the method further includes: In response to an axis point check instruction, a selected target vertex to be checked is determined, and a virtual mapping object between the selected target vertex and a target axis point corresponding to the selected target vertex is displayed, wherein the virtual mapping object is used to show the corresponding relationship between the selected target vertex and the target axis point.
6. The method according to claim 4, characterized in that The step of determining the axis point information corresponding to the target vertex according to the target axis point includes: Determine the axis point information format; If the axis point information format is a vector format, then for each drawn object, based on the first target axis point corresponding to the first target vertex contained in the drawn object, determine the maximum distance between each first target axis point and the world coordinate origin, use the maximum distance as the maximum axis point distance of the drawn object, and determine the axis point information of each drawn object based on the maximum axis point distance of each drawn object and the first target axis point vector; If the axis point information format is a position format, then for each drawn object, an axis point cube model is generated based on the second target axis point corresponding to the second target vertex contained in the drawn object, the longest diagonal of the axis point cube model is taken as the axis point model size of the drawn object, and the shortest distance between the axis point cube model and the world coordinate origin is taken as the minimum axis point distance; based on the axis point model size corresponding to each drawn object, the minimum axis point distance and the second target axis point position, the axis point information of each drawn object is determined.
7. The method according to claim 6, characterized in that The determining of the axis point information format includes: Determining the object model size of the drawn object; If the size of the object model is smaller than a preset size, determining that the format of the axis point information is a vector format; If the size of the object model is greater than or equal to the preset size, the axis point information format is determined to be a position format.
8. An axis point drawing device, characterized in that: The device comprises: A drawing point determination module, used to determine a target vertex set to be drawn among the vertices of the drawn object, and determine a candidate axis point set of the target vertex set, wherein the target vertex set includes at least one target vertex, and the candidate axis point set includes at least one candidate axis point; An axis point determination module, used to select a target axis point determination mode, and determine a target axis point corresponding to each target vertex based on the target axis point determination mode and the candidate axis point set; The information determination module is used to determine the axis point information corresponding to the target vertex according to the target axis point.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.