Disclosure of Invention
The invention mainly aims to solve the technical problem of how to reappear the binding process of the binding belt in the virtual reality world.
The invention provides a binding belt simulation method in a first aspect, which comprises the following steps: constructing a simulation object to obtain a bandage skeleton model;
determining the length of each edge of the simulation object according to the bone length of the bandage bone model;
and obtaining the simulation form of the bandage bone model according to the length of each edge of the simulation object and the internal angle of the simulation object, wherein the internal angle of the simulation object is preset.
Optionally, in a first implementation manner of the first aspect of the present invention, after the constructing the simulation object and obtaining the bandage bone model, the method further includes:
numbering each section of bone in the bone tying model from top to bottom, wherein the length of each section of bone in the bone tying model is the same;
after determining the length of each edge of the simulated object according to the bone length of the bandage bone model, the method further comprises:
and determining a bone number sequence corresponding to each edge of the simulation object according to the length of each edge of the simulation object.
Optionally, in a second implementation manner of the first aspect of the present invention, after determining the length of each edge of the simulation object according to the bone length of the bandage bone model, the method further includes:
determining the number of each section of bone in the edge bone of each edge according to the bone number sequence corresponding to each edge of the simulation object, wherein the number of bones in the edge bone is preset;
and determining the bending angle of each section of bone in the edge bone according to the number of bones in the edge bone and the internal angle of the simulation object.
Optionally, in a third implementation manner of the first aspect of the present invention, the simulation object is a rectangle, a long side of the rectangle includes n segments of bones, a wide side of the rectangle includes m segments of bones, the edge bones include a first group of edge bones, a second group of edge bones, and a third group of edge bones, and the bone number sequences corresponding to each side of the simulation object are respectively: 1 to n, n +1 to n + m, n + m +1 to 2n + m, 2n + m +1 to 2n +2m, wherein n > 1, m > 1, and n and m are integers,
the determining the number of each segment of bone in the edge bone of each edge according to the bone number sequence corresponding to each edge of the simulation object includes:
determining the number of each bone segment in the first group of edge bones as follows: n-1, n + 1;
determining the number of each bone segment in the second group of edge bones as follows: n + m-1, n + m, n + m + 1;
determining the number of each bone segment in the third group of edge bones as follows: 2n + m-1, 2n + m, 2n + m + 1;
the determining the bending angle of each segment of the edge bone according to the number of the bones in the edge bone and the inner angle of the simulation object comprises the following steps:
determining that the first, second, and third sets of edge bones each comprise three segments of bones, an interior angle of the simulation object being 90 degrees;
determining a bend angle of each of the first, second, and third sets of edge bones to be 30 degrees.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the simulation object is an equilateral triangle, each side of the equilateral triangle includes q segments of bones, the edge bones include a first group of edge bones and a second group of edge bones, and the bone number sequences corresponding to each side of the simulation object are respectively: 1 to q, q +1 to 2q, 2q +1 to 3q, wherein q > 1 and q is an integer,
the determining the number of each segment of bone in the edge bone of each edge according to the bone number sequence corresponding to each edge of the simulation object includes:
determining the number of each bone segment in the first group of edge bones as follows: q-1, q + 1;
determining the number of each bone segment in the second group of edge bones as follows: 2q-1, 2q + 1;
the determining the bending angle of each segment of the edge bone according to the number of the bones in the edge bone and the inner angle of the simulation object comprises the following steps:
determining that the first and second sets of edge bones each comprise three segments of bones, and that an interior angle of the simulated object is 60 degrees;
determining the bending angle of each bone segment in the first group of edge bones and the second group of edge bones to be 20 degrees.
Optionally, in a fifth implementation manner of the first aspect of the present invention, after determining the bending angle of each segment of bone in the edge bone according to the number of bones in the edge bone and the internal angle of the simulation object, the method includes:
bending each section of the edge skeleton according to a preset skeleton bending speed;
judging whether each section of skeleton in the edge skeleton reaches the bending angle once every frame;
if not, continuously bending each section of skeleton in the edge skeleton at the preset skeleton bending speed;
if so, the next frame stops bending each of the edge bones.
The second aspect of the present invention provides a band binding simulation device, which is characterized by comprising:
the building module is used for building a simulation object to obtain a bandage bone model;
the preprocessing module is used for determining the length of each edge of the simulation object according to the bone length of the bandage bone model;
and the processing module is used for obtaining the simulation form of the bandage bone model according to the length of each edge of the simulation object and the internal angle of the simulation object, wherein the internal angle of the simulation object is preset.
Optionally, in a first implementation manner of the second aspect of the present invention, the preprocessing module is further configured to number, from beginning to end, each segment of bone in the band-bonded bone model, where the lengths of each segment of bone in the band-bonded bone model are the same;
the preprocessing module is further configured to determine a bone number sequence corresponding to each edge of the simulated object according to the length of each edge of the simulated object.
Optionally, in a second implementation manner of the second aspect of the present invention, the preprocessing module is further configured to determine, according to a bone number sequence corresponding to each edge of the simulation object, a number of each segment of bone in edge bones of each edge, where a number of bones in the edge bones is preset;
the preprocessing module is further used for determining the bending angle of each section of bone in the edge bone according to the number of the bones in the edge bone and the internal angle of the simulation object.
Optionally, in a third implementation manner of the second aspect of the present invention, the simulation object is a rectangle, a long side of the rectangle includes n segments of bones, a wide side of the rectangle includes m segments of bones, the edge bones include a first group of edge bones, a second group of edge bones, and a third group of edge bones, and the bone number sequences corresponding to each side of the simulation object are respectively: 1 to n, n +1 to n + m, n + m +1 to 2n + m, 2n + m +1 to 2n +2m, wherein n > 1, m > 1,
the preprocessing module is further configured to determine that the number of each bone segment in the first group of edge bones is: n-1, n + 1; determining the number of each bone segment in the second group of edge bones as follows: n + m-1, n + m, n + m + 1; determining the number of each bone segment in the third group of edge bones as follows: 2n + m-1, 2n + m, 2n + m + 1;
the preprocessing module is further configured to determine that the first, second, and third sets of edge bones each include three segments of bones, and an interior angle of the simulation object is 90 degrees; determining a bend angle of each of the first, second, and third sets of edge bones to be 30 degrees.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the simulation object is an equilateral triangle, each side of the equilateral triangle includes q segments of bones, the edge bones include a first group of edge bones and a second group of edge bones, and the bone number sequences corresponding to each side of the simulation object are respectively: 1 to q, q +1 to 2q, 2q +1 to 3q, where q > 1,
the preprocessing module is further configured to determine that the number of each bone segment in the first group of edge bones is: q-1, q + 1; determining the number of each bone segment in the second group of edge bones as follows: 2q-1, 2q + 1;
the preprocessing module is further configured to determine that the first group of edge bones and the second group of edge bones each include three segments of bones, and an internal angle of the simulation object is 60 degrees; determining the bending angle of each bone segment in the first group of edge bones and the second group of edge bones to be 20 degrees.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the processing module is further configured to bend each of the edge bones according to a preset bone bending speed;
the processing module is further configured to determine, once per frame, whether each section of the edge skeleton reaches the bending angle; if not, continuously bending each section of skeleton in the edge skeleton at the preset skeleton bending speed; if so, the next frame stops bending each of the edge bones.
The third aspect of the invention provides a binding belt simulation device, which comprises: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor invokes the instructions in the memory to cause the strap tie simulation apparatus to perform the strap tie simulation method described above.
A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the strap-binding simulation method described above.
The technical scheme provided by the invention comprises the following steps: constructing a simulation object to obtain a bandage skeleton model; determining the length of each edge of the simulation object according to the bone length of the bandage bone model; and obtaining the simulation form of the bandage bone model according to the length of each edge of the simulation object and the internal angle of the simulation object, wherein the internal angle of the simulation object is preset. Therefore, the binding process of the binding belt can be simulated in the virtual reality, the binding belt can be bound into a shape with a specific simulation form, and the shape with the specific simulation form can be reproduced in the virtual reality.
Detailed Description
The embodiment of the invention provides a ribbon binding simulation method, a ribbon binding simulation device, ribbon binding simulation equipment and a storage medium, wherein the ribbon binding simulation method comprises the steps of constructing a simulation object to obtain a ribbon skeleton model; determining the length of each edge of the simulation object according to the bone length of the bandage bone model; and obtaining the simulation form of the bandage bone model according to the length of each edge of the simulation object and the internal angle of the simulation object, wherein the internal angle of the simulation object is preset. Therefore, the binding process of the binding belt can be simulated in the virtual reality, the binding belt can be bound into a shape with a specific simulation form, and the shape with the specific simulation form can be reproduced in the virtual reality.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, a first embodiment of a ribbon binding simulation method in the embodiment of the present invention includes:
101. constructing a simulation object to obtain a bandage skeleton model;
it is understood that the execution main body of the invention may be a band binding simulation device, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
In this embodiment, the simulation of the band tying is implemented in the virtual reality space, a simulation object of the band is first constructed, and here, a band skeleton model of the simulation object is constructed by using UE4 (umregl engime 4, illusion 4 engine), where the band skeleton model is composed of a plurality of band skeletons, and each band skeleton has a fixed length, and the total length of the band skeleton model is obtained by combining the skeleton skeletons. For example, the belted bone model consists of 100 pieces of belted bone, and each piece of belted bone has a length of 0.29cm, and the length of the belted bone model is 29 cm. The bones of the bandage can be shaped in a specific way by changing the rotation angle of the bones in real time during the binding of the bandage into a specific shape.
102. And determining the length of each edge of the simulation object according to the bone length of the bandage bone model.
And determining the length of each edge of the simulation object according to the bone length of the bandage bone model, wherein the shape of the simulation object is not limited. For example, if the simulation object is a rectangle, the length of the long side of the rectangle is X, and the length of the wide side is Y. If the length of the bandage bone model is 29cm, 2X +2Y is less than or equal to 29 cm. If the cable tie skeleton model consists of 100 cable tie skeletons, one long side of the rectangle needs n sections of skeletons, and one wide side needs m sections of skeletons, then n + m is less than or equal to 100. n and m must be integers. n is X/0.29, and m is Y/0.29. (the results of n and m may be rounded up). After obtaining the results of n and m, it is checked whether 2n +2m ≦ 100 is true. If the length and the width are not reasonable, the ribbon is not operated. And if so, carrying out the next operation.
In another example, if the simulation object is an equilateral triangle, the length of each side is less than or equal to 1/3 times the length of the bone. Assume that each side of an equilateral triangle is Z in length. If the length of the bandage bone model is 29cm, the 3Z is less than or equal to 29 cm. If the bandage bone model consists of 100 bandage bones as described above, each side of the triangle needs q sections of bones, and 3q is less than or equal to 100. q must be an integer. q is Z/0.29. (the result of q may be rounded up) after the result of q is obtained, it is checked whether 3 q.ltoreq.100 holds. If the side length is not reasonable, the set side length is not reasonable, and the ribbon is not operated. And if so, carrying out the next operation.
In this embodiment, the ribbon binding simulation instruction of the ribbon bone model is actively triggered and sent by a user, and the triggering of the ribbon binding simulation instruction can be realized through a prop control, that is, through a user interface control, after the user carries vr (virtual Remlty) equipment, any visual control or element of a virtual space can be seen, such as a picture, an input frame, a text frame, a button, a label, a ribbon binding action and other controls, and the user interface control can respond to the operation of the user to perform a specified action in a corresponding band binding interval, so that the ribbon binding simulation instruction of the ribbon bone model can be triggered; the other method is that the behavior operation of the user is detected through the photographic equipment, and when the detected user is used as the preset action of the binding tape, the binding tape simulation instruction of the binding tape skeleton model can be triggered.
In addition, parameters of the simulation object in the simulation instruction are bound by the binding belt so as to describe the shape track and the size of the simulation object. The simulation object is formed by locally combining various different shapes or shapes, so that the simulation object needs to be cut into various simulation object units for describing a single shape, such as a linear equation, a circular equation, an elliptic equation, a spherical equation and the like. The simulation size of the simulation object may be expressed by calculating the length or diameter of each simulation object cell. The final shape of the bandage binding simulation can be obtained by limiting the shape and the length of the simulation object.
103. And obtaining the simulation form of the bandage bone model according to the length of each edge of the simulation object and the internal angle of the simulation object.
And after the length of each edge of the simulation object is calculated, obtaining the simulation form of the bandage bone model according to the internal angle of the simulation object. The internal angle of the simulation object can be preset. For example, if the simulation object is rectangular, the internal angle of the simulation object is 90 degrees. If the simulation object is an equilateral triangle, the internal angle of the simulation object is 60 degrees. The simulation object may also be in other shapes, and correspondingly, the internal angle may also be in other degrees, which is not limited herein.
After the length of each side of the simulation object and the internal angle of the simulation object are obtained, the simulation form of the bandage bone model can be obtained.
The invention provides a ribbon binding simulation method, which comprises the following steps: constructing a simulation object to obtain a bandage skeleton model; determining the length of each edge of the simulation object according to the bone length of the bandage bone model; and obtaining the simulation form of the bandage bone model according to the length of each edge of the simulation object and the internal angle of the simulation object, wherein the internal angle of the simulation object is preset. Therefore, the binding process of the binding belt can be simulated in the virtual reality, the binding belt can be bound into a shape with a specific simulation form, and the shape with the specific simulation form can be reproduced in the virtual reality.
Referring to fig. 2, a second embodiment of the simulation method for binding a binding tape according to the embodiment of the present invention includes:
201. and constructing a simulation object to obtain a bandage bone model.
Referring to the first embodiment, the description is omitted.
202. And numbering each section of bone in the bone-tying model according to the sequence from the head to the tail of the bone-tying model.
And numbering each section of bone in the bone model of the bandage according to the sequence from head to tail of the bone model of the bandage. As in the first embodiment described above, if the cable-tie bone model consists of 100 cable-tie bones, the numbering starts from the first segment of the 100 cable-tie bones and continues to the last segment. The 100 sections of the cable-tying bones are numbered as 1, 2, 3 and 99, 100.
203. And determining the length of each edge of the simulation object according to the bone length of the bandage bone model.
The length of each side of the simulation object is determined according to the length of the bandage bone model. See the first embodiment described above.
In a specific case, if the cable-tie bone model consists of 100 cable-tie bones, the simulation object is rectangular. One long side of the rectangle needs n sections of skeleton, one wide side needs m sections of skeleton, and then n + m is less than or equal to 100. Illustratively, the long side may be 30 segments of bone and the wide side may be 20 segments of bone.
In another specific case, if the cable tie bone model is composed of 100 cable tie bones, the simulation object is an equilateral triangle. Each side of the equilateral triangle needs q sections of bones, and 3q is less than or equal to 100. Illustratively, each side of the triangle may be 33 segments of bone.
204. And determining a bone number sequence corresponding to each edge of the simulation object according to the length of each edge of the simulation object.
And determining a bone number sequence corresponding to each edge of the simulation object according to the length of each edge of the simulation object.
Specifically, if the simulation object is a rectangle, the long side of the rectangle includes n segments of bones, and the wide side of the rectangle includes m segments of bones, it can be understood that the bone numbered 1 in the cable tie bone model is located at the vertex of the rectangle. Then the bone number sequences corresponding to the four edges of the simulation object are respectively: 1 to n, n +1 to n + m, n + m +1 to 2n + m, 2n + m +1 to 2n +2m, wherein n > 1, m > 1, and n and m are integers.
For example, the long side may be 30 segments of bone and the wide side may be 20 segments of bone. Then the bone number sequence corresponding to the first section long edge is: 1. 2, 3. The bone number sequence corresponding to the first section of broadside is as follows: 31. 32, 33. The bone number sequence corresponding to the long side of the second section is as follows: 51. 52, 53. The bone number sequence corresponding to the second section of broadside is as follows: 81. 82, 83.
If the simulation object is an equilateral triangle, each side of which contains q segments of bone, it will be appreciated that the bone numbered 1 in the cable tie bone model is located at the vertices of the triangle. The bone number sequences corresponding to the three edges of the simulation object are respectively as follows: 1 to q, q +1 to 2q, 2q +1 to 3q, wherein q > 1 and q is an integer.
For example, each side of the side triangles may be 33 segments of bone. Then the bone number sequence corresponding to the first edge is: 1. 2, 3. The bone number sequence corresponding to the second side is as follows: 34. 35, 36. The bone number sequence corresponding to the third edge is as follows: 67. 68, 69.
205. And determining the number of each section of bone in the edge bone of each edge according to the bone number sequence corresponding to each edge of the simulation object.
And determining the number of each section of bone in the edge bone of each edge according to the bone number sequence corresponding to each edge of the simulation object. It should be noted that the number of the edge bones of each edge is preset, and can be set according to the user requirement. In one specific example, the number of the edge bones of each group is set to 3. The number of the edge bones in a group is 3 for the following description, but the invention is not limited thereto.
Specifically, if the simulation object is a rectangle, the bone number sequences corresponding to the four sides of the simulation object are respectively: 1 to n, n +1 to n + m, n + m +1 to 2n + m, 2n + m +1 to 2n +2 m. Then it can be determined that the number of each bone segment in the first set of edge bones is: n-1, n + 1; determining the number of each bone segment in the second group of edge bones as follows: n + m-1, n + m, n + m + 1; determining the number of each bone segment in the third group of edge bones as follows: 2n + m-1, 2n + m, 2n + m + 1.
Further, when the rectangle has a long side with 30 segments of bones and a wide side with 20 segments of bones, the number of each segment of bones in the first group of edge bones of the rectangle is respectively: 29. 30, 31; the number of each section of bone in the second group of edge bones is respectively as follows: 49. 50, 51; the number of each segment of bone in the third group of edge bones is respectively: 79. 80 and 81.
If the simulation object is an equilateral triangle, the bone number sequences corresponding to the simulation object are respectively as follows: 1 to q, q +1 to 2q, 2q +1 to 3 q. Then it can be determined that the number of each bone segment in the first set of edge bones is: q-1, q + 1; determining the number of each bone segment in the second group of edge bones as follows: 2q-1, 2q + 1.
Further, when each side of the triangle is 33 segments of bone, the number of each segment of bone in the first set of edge bones of the triangle is: 32. 33, 34; the number of each bone segment in the second group of edge bones is respectively as follows: 65. 66, 67.
206. And determining the bending angle of each section of bone in the edge bone according to the number of bones in the edge bone and the internal angle of the simulation object.
And determining the bending angle of each section of bone in the edge bone according to the number of the bones in the edge bone and the internal angle of the simulation object. In this embodiment, the bending angles of the bones are the same, but the present invention is not limited thereto, and the bending angles of the bones may be different.
When the bending angle of each section of bone is the same, the bending angle of each section of bone in a group of edge bones can be obtained by dividing the inner angle of the simulation object by the number of the edge bones in the group of edge bones.
In a specific example, if the simulation object is a rectangle, the internal angle is 90 degrees, and when each group of edge bones of the simulation object includes 3 pieces of bones, each piece of bone in each group of edge bones can be bent to 30 degrees.
In another specific example, if the simulation object is an equilateral triangle, the internal angle is 60 degrees, and when each set of edge bones of the simulation object includes 3 pieces of bones, each piece of bones of each set of edge bones can be bent to 20 degrees.
It should be noted that the number of the edge bones of each group can be set artificially, and only 3 segments are taken as an example, but not as a limitation of the present invention.
207. Bending each of the marginal bones.
Bending each of the edge bones according to the bending degree of each of the edge bones obtained in the step 206.
It should be noted that, the bending each of the peripheral bones may further include the following steps, please refer to fig. 3:
2071. and bending each section of the edge bones according to a preset bone bending speed.
And bending each section of the marginal skeleton according to a preset skeleton bending speed. The preset bone bending speed can be set at will according to needs, and the bending speed of the bone can be v degrees/frame.
When bending of each of the edge bones is started, each of the edge bones determined in the above step 205 is bent at a bending speed of v degrees per frame.
2072. And judging whether each section of the edge bones reaches the bending angle once every frame.
It is determined once per frame whether each of the edge bones reaches the bending angle determined in step 206.
2073. If not, continuously bending each section of skeleton in the edge skeleton at the preset skeleton bending speed; if so, the next frame stops bending each of the edge bones.
When each section of the edge bones does not reach the bending angle determined in the step 206, continuously bending each section of the edge bones at the preset bone bending speed v;
when each of the edge bones reaches the bending angle determined in step 206, the next frame stops bending each of the edge bones, and the cable tie bone model has become a preset simulation shape.
Referring to fig. 4, fig. 4 is a schematic diagram of a rectangular shape obtained by the ribbon binding simulation method provided by the invention. It should be noted that the rectangular shape obtained in the present invention is a rounded rectangle visually.
Referring to fig. 5, fig. 5 is a schematic diagram of an equilateral triangle obtained by the ribbon binding simulation method provided by the invention. It should be noted that the equilateral triangle shape obtained in the present invention is visually a rounded equilateral triangle.
In the above description of the simulation method for binding a ribbon according to the embodiment of the present invention, referring to fig. 6, a simulation device for binding a ribbon according to the embodiment of the present invention is described below, where one embodiment of the simulation device for binding a ribbon according to the embodiment of the present invention includes:
the building module 301 is used for building a simulation object to obtain a bandage bone model;
a preprocessing module 302, configured to determine a length of each edge of the simulation object according to a bone length of the bandage bone model;
the processing module 303 is configured to obtain a simulation shape of the bandage bone model according to the length of each side of the simulation object and an internal angle of the simulation object, where the internal angle of the simulation object is preset.
The preprocessing module 302 is further configured to number each segment of bone in the band-bonded bone model according to a sequence from head to tail, where the lengths of each segment of bone in the band-bonded bone model are the same;
the preprocessing module 302 is further configured to determine a bone number sequence corresponding to each edge of the simulated object according to the length of each edge of the simulated object.
The preprocessing module 302 is further configured to determine, according to a bone number sequence corresponding to each edge of the simulation object, a number of each segment of bone in an edge bone of each edge, where the number of bones in the edge bone is preset;
the preprocessing module 302 is further configured to determine a bending angle of each segment of the edge bone according to the number of bones in the edge bone and an inner angle of the simulation object.
If the simulation object is a rectangle, the long side of the rectangle comprises n segments of bones, the wide side of the rectangle comprises m segments of bones, the edge bones comprise a first group of edge bones, a second group of edge bones and a third group of edge bones, and the bone number sequences corresponding to each side of the simulation object are respectively as follows: 1 to n, n +1 to n + m, n + m +1 to 2n + m, 2n + m +1 to 2n +2m, wherein n > 1, m > 1,
the preprocessing module 302 is further configured to determine that the number of each bone segment in the first group of edge bones is: n-1, n + 1; determining the number of each bone segment in the second group of edge bones as follows: n + m-1, n + m, n + m + 1; determining the number of each bone segment in the third group of edge bones as follows: 2n + m-1, 2n + m, 2n + m + 1;
the preprocessing module 302 is further configured to determine that the first set of edge bones, the second set of edge bones, and the third set of edge bones each include three segments of bones, and an internal angle of the simulation object is 90 degrees; determining a bend angle of each of the first, second, and third sets of edge bones to be 30 degrees.
If the simulation object is an equilateral triangle, each side of the equilateral triangle comprises q sections of bones, the edge bones comprise a first group of edge bones and a second group of edge bones, and the number sequences of the bones corresponding to each side of the simulation object are respectively as follows: 1 to q, q +1 to 2q, 2q +1 to 3q, where q > 1,
the preprocessing module 302 is further configured to determine that the number of each bone segment in the first group of edge bones is: q-1, q + 1; determining the number of each bone segment in the second group of edge bones as follows: 2q-1, 2q + 1;
the preprocessing module 302 is further configured to determine that the first set of edge bones and the second set of edge bones each include three segments of bones, and an internal angle of the simulation object is 60 degrees; determining the bending angle of each bone segment in the first group of edge bones and the second group of edge bones to be 20 degrees.
The processing module 303 is further configured to bend each section of the edge skeleton according to a preset skeleton bending speed;
the processing module 303 is further configured to determine, once per frame, whether each section of bone in the edge bone reaches the bending angle; if not, continuously bending each section of skeleton in the edge skeleton at the preset skeleton bending speed; if so, the next frame stops bending each of the edge bones.
The band binding simulation device provided by the invention comprises: the building module 301 is used for building a simulation object to obtain a bandage bone model; a preprocessing module 302, configured to determine a length of each edge of the simulation object according to a bone length of the bandage bone model; the processing module 303 is configured to obtain a simulation shape of the bandage bone model according to the length of each side of the simulation object and an internal angle of the simulation object, where the internal angle of the simulation object is preset. Therefore, the binding process of the binding belt can be simulated in the virtual reality, the binding belt can be bound into a shape with a specific simulation form, and the shape with the specific simulation form can be reproduced in the virtual reality.
Fig. 6 above describes the band binding simulation apparatus in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the band binding simulation apparatus in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 7 is a schematic structural diagram of a band ligation simulation device according to an embodiment of the present invention, where the band ligation simulation device 400 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 410 (e.g., one or more processors) and a memory 420, and one or more storage media 430 (e.g., one or more mass storage devices) storing an application 433 or data 432. Memory 420 and storage medium 430 may be, among other things, transient or persistent storage. The program stored on the storage medium 430 may include one or more modules (not shown), each of which may include a series of instructions operating on the strap tie simulation device 400. Still further, the processor 410 may be configured to communicate with the storage medium 430 to execute a series of instructional operations on the storage medium 430 on the strap tie simulation device 400.
The strap tie simulation apparatus 400 may also include one or more power sources 440, one or more wired or wireless network interfaces 450, one or more input-output interfaces 460, and/or one or more operating systems 431, such as Wimdows Server, Nmc OS X, Umix, Limux, FreeBSD, and the like. Those skilled in the art will appreciate that the strap binding simulation device configuration shown in FIG. 7 does not constitute a limitation of the strap binding simulation device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, which may also be a volatile computer readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the strap binding simulation method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a rom (rom), a random access memory (RMN), a magnetic disk, and an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.