TWI387473B - System and method for checking collision of objects - Google Patents

System and method for checking collision of objects Download PDF

Info

Publication number
TWI387473B
TWI387473B TW97112270A TW97112270A TWI387473B TW I387473 B TWI387473 B TW I387473B TW 97112270 A TW97112270 A TW 97112270A TW 97112270 A TW97112270 A TW 97112270A TW I387473 B TWI387473 B TW I387473B
Authority
TW
Taiwan
Prior art keywords
sphere
coordinate system
values
spherical
objects
Prior art date
Application number
TW97112270A
Other languages
Chinese (zh)
Other versions
TW200942303A (en
Inventor
Hai-Lin Yuan
wen-jun Xie
Gao-Ke Yang
Ye-Yu Lang
li-ping Gao
zong-ren Yin
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW97112270A priority Critical patent/TWI387473B/en
Publication of TW200942303A publication Critical patent/TW200942303A/en
Application granted granted Critical
Publication of TWI387473B publication Critical patent/TWI387473B/en

Links

Landscapes

  • Processing Or Creating Images (AREA)

Description

物件碰撞檢測系統及方法Object collision detection system and method

本發明涉及一種檢測系統及方法,尤其涉及一種物件碰撞檢測的系統及方法。The invention relates to a detection system and method, in particular to a system and method for object collision detection.

在現有的一些遊戲和仿真軟體中,存在很多物件,物件之間的碰撞檢測非常重要。在遊戲軟體中,若沒有物件碰撞檢測,會使得物件穿過彼此,三維畫面很不真實。在仿真軟體中,物件碰撞檢測也是非常必要的,如生產線仿真軟體中,人與機台之間的碰撞檢測,人與叉車之間的碰撞檢測等,都是非常必要的,如果沒有上述碰撞檢測,會導致仿真畫面不真實。In some existing games and simulation software, there are many objects, and collision detection between objects is very important. In the game software, if there is no object collision detection, the objects will pass through each other, and the three-dimensional picture is very unreal. In the simulation software, object collision detection is also very necessary. For example, in the production line simulation software, the collision detection between the person and the machine, the collision detection between the person and the forklift, etc. are all necessary, if there is no such collision detection. Will cause the simulation picture to be unreal.

目前,即使存在物件碰撞檢測,但是由於實現過程比較複雜,導致視覺上延時比較長,達到的動畫效果不流暢,給用戶帶來的視覺效果不好。At present, even if there is object collision detection, due to the complicated implementation process, the visual delay is long, the animation effect is not smooth, and the visual effect brought to the user is not good.

鑒於以上內容,有必要提供一種有效的檢測物件之間是否有碰撞的系統及方法。In view of the above, it is necessary to provide an effective system and method for detecting collisions between objects.

所述物件碰撞檢測系統,包括電腦及與該電腦相連的資料庫,該資料庫中存儲有待測物件,所述電腦包括:生成模組,用於在三維局部座標係中生成框住待測物件的長方體,還用於根據該長方體生成一個固定在三維局部座標係上的球體;獲取模組,用於根據球體在三維局部座標係上的球心座標值獲取該球體在世界座標係上的球心座標 值;計算模組,用於計算符檢測的兩個物件所生成球體在世界座標係中的球心距;及判斷模組,用於判斷球心距是否大於待檢測的兩個物件所生成球體半徑值的和,若所述球心距不大於待測物件所生成球體半徑值的和,則該兩個物件發生碰撞;若所述球心距大於待測物件所生成球體半徑值的和,則該兩個物件沒有發生碰撞。The object collision detecting system comprises a computer and a database connected to the computer, wherein the database stores the object to be tested, and the computer comprises: a generating module, configured to generate a frame to be tested in the three-dimensional local coordinate system The rectangular parallelepiped of the object is further configured to generate a sphere fixed on the three-dimensional local coordinate system according to the rectangular parallelepiped; and the acquiring module is configured to obtain the spherical body on the world coordinate system according to the spherical coordinate value of the spherical body on the three-dimensional local coordinate system; Ball center coordinates a calculation module for calculating a spherical center distance of a sphere generated by two objects detected by a character in a world coordinate system; and a judging module for judging whether the spherical distance is greater than a sphere generated by the two objects to be detected The sum of the radius values, if the spherical center distance is not greater than the sum of the sphere radius values generated by the object to be tested, the two objects collide; if the spherical center distance is greater than the sum of the sphere radius values generated by the object to be tested, Then the two objects did not collide.

所述物件碰撞檢測方法,該方法包括如下步驟:在三維局部座標係中生成框住待測物件的長方體;根據該長方體生成一個固定在三維局部座標係上的球體;根據該球體在所述三維局部座標係上的球心座標值獲取該球體在世界座標係上的球心座標值;計算待檢測的兩個物件所生成球體在世界座標係中的球心距;判斷球心距是否大於待測兩個物件所生成球體半徑值的和;若所述球心距不大於待測物件所生成球體半徑值的和,則該兩個物件發生碰撞;及若所述球心距大於待測物件所生成球體半徑值的和,則該兩個物件沒有發生碰撞。The object collision detecting method comprises the steps of: generating a rectangular parallelepiped of the object to be tested in the three-dimensional local coordinate system; generating a sphere fixed on the three-dimensional local coordinate system according to the rectangular parallelepiped; according to the spherical body in the three-dimensional The spherical coordinate value on the local coordinate system obtains the spherical coordinate value of the sphere on the world coordinate system; calculates the spherical center distance of the sphere generated by the two objects to be detected in the world coordinate system; determines whether the spherical center distance is greater than Measuring the sum of the sphere radius values generated by the two objects; if the spherical center distance is not greater than the sum of the sphere radius values generated by the object to be tested, the two objects collide; and if the spherical center distance is greater than the object to be tested The sum of the generated sphere radius values, the two objects do not collide.

相較於習知技術,所述物件碰撞檢測系統及方法,能夠有效快速的進行物件碰撞的檢測,使得用戶看到的畫面流暢。Compared with the prior art, the object collision detecting system and method can effectively and quickly detect the collision of objects, so that the screen seen by the user is smooth.

如圖1所示,是本發明物件碰撞檢測系統較佳實施例的硬體架構圖。該系統包括電腦1,與該電腦1相連的資料庫2。所述電腦1用於檢測物件之間的碰撞,所述資料庫2用於存儲需要檢測的物件模型,本實施例中,是以生 產線仿真軟體中的物件模型為例進行說明物件之間的碰撞檢測,該資料庫2中存儲有該仿真軟體中的物件,如:機台、操作機台的操作人員及叉車等。該資料庫2中還有多個鏈表,用於存儲待測物件的資訊,於本實施例中,所述符測物件是指機台的一部分或者機台本身,操作人員的身體一部分或者操作人員的本身,叉車的一部分或者叉車本身等。所述電腦1還連接有鍵盤3、滑鼠4及顯示器5,作為檢測物件碰撞的輸入設備和輸出設備。As shown in FIG. 1, it is a hardware architecture diagram of a preferred embodiment of the object collision detecting system of the present invention. The system includes a computer 1, a database 2 connected to the computer 1. The computer 1 is configured to detect a collision between objects, and the database 2 is used to store an object model to be detected. In this embodiment, The object model in the production line simulation software is used as an example to describe the collision detection between the objects. The database 2 stores the objects in the simulation software, such as the machine, the operator of the operating machine, and the forklift. The database 2 also has a plurality of linked lists for storing information of the object to be tested. In the embodiment, the measuring object refers to a part of the machine or the machine itself, a part of the operator's body or operation. The person himself, part of the forklift or the forklift itself. The computer 1 is also connected with a keyboard 3, a mouse 4 and a display 5 as an input device and an output device for detecting object collision.

如圖2所示,是本發明物件碰撞檢測系統較佳實施例的電腦1的功能模組圖。在物件碰撞檢測之前,首先要對用戶需要檢測的物件在直角座標係上進行投影,然後用戶對該直角座標係上的投影進行框選。本實施例中,以對物件的俯視面投影到直角座標係上,並對該投影框選來說明該發明。所述電腦1包括生成模組10、獲取模組12、存儲模組14、計算模組16及判斷模組18。As shown in FIG. 2, it is a functional block diagram of the computer 1 of the preferred embodiment of the object collision detecting system of the present invention. Before the object collision detection, the object that the user needs to detect is first projected on the Cartesian coordinate system, and then the user selects the projection on the Cartesian coordinate system. In this embodiment, the plan view of the object is projected onto a rectangular coordinate system, and the invention is selected for the projection frame. The computer 1 includes a generating module 10, an obtaining module 12, a storage module 14, a computing module 16, and a determining module 18.

生成模組10用於在XY直角座標係上生成用戶所框選物件俯視面的矩形框,並在三維局部座標係中,根據該物件在Z軸的高度將該矩形框沿著Z軸進行延伸,生成框住該待測物件的長方體。The generating module 10 is configured to generate a rectangular frame on the XY rectangular coordinate system to form a plane of the object selected by the user, and extend the rectangular frame along the Z axis according to the height of the object in the three-dimensional partial coordinate system. , generating a rectangular parallelepiped that frames the object to be tested.

獲取模組12用於獲取最大範圍點和最小範圍點的座標值,該座標值不一定位於該長方體上。設座標值表示為(X,Y,Z),其中,最大範圍點的(X,Y,Z)值分別為該長方體上所有點座標值中最大的Xmax 、Ymax 、Zmax 值。同理,最小範圍點的(X,Y,Z)值分別為該長方體上所 有點座標值上最小的Xmin 、Ymin 、Zmin 值。The obtaining module 12 is configured to obtain coordinate values of the maximum range point and the minimum range point, and the coordinate value is not necessarily located on the cuboid. Let the coordinate value be expressed as (X, Y, Z), where the (X, Y, Z) values of the maximum range point are the maximum X max , Y max , Z max values of all point coordinate values on the cuboid, respectively. Similarly, the (X, Y, Z) values of the minimum range points are the minimum X min , Y min , and Z min values of all point coordinates on the cuboid.

所述生成模組10還用於生成一個球體,該球在三維局部座標係上的球心座標值為最大範圍點座標值與最小範圍點座標值和的一半,該球的半徑值為最大範圍點與最小範圍點之間的距離的一半。The generating module 10 is further configured to generate a sphere, wherein the sphere center coordinate value on the three-dimensional local coordinate system is half of the sum of the maximum range point coordinate value and the minimum range point coordinate value, and the radius value of the ball is the maximum range. Half the distance between the point and the smallest range point.

存儲模組14用於將所述球體在三維局部座標係上的球心座標值及半徑值保存至資料庫2的鏈表中。每個鏈表用於存儲一個整體物件中所有組成該整體物件的部分物件所生成球體的球心座標值與半徑值,例如:操作機台和操作人員分別被分成很多待檢測的物件,該資料庫2中有一個鏈表用於存儲所有組成該操作機台的物件生成的球體球心座標值和半徑值,另有一個鏈表用於存儲所有組成操作人員的物件生成的球體球心座標值和半徑值。The storage module 14 is configured to save the spherical coordinate values and the radius values of the sphere on the three-dimensional local coordinate system to the linked list of the database 2. Each linked list is used to store a spherical coordinate value and a radius value of a sphere generated by all the objects constituting the integral object in the overall object, for example, the operating machine and the operator are respectively divided into a plurality of objects to be detected, and the data is respectively In the library 2, there is a linked list for storing spherical spherical coordinates and radius values generated by all the objects constituting the operating machine, and a linked list for storing spherical spherical coordinates generated by all the components constituting the operator. And radius values.

所述獲取模組12還用於在鏈表中獲取待檢測物件所生成球體的球心座標值和半徑值,並根據球體在三維局部座標係上的球心座標值獲取該球體在世界座標係上的球心座標值,並獲取該三維局部座標係的原點在世界座標係中的座標值(X1,Y1,Z1)。三維局部座標係中的座標值(X,Y,Z)轉換為世界座標係(X2,Y2,z2)的座標值的公式為:X2=X1+X,Y2=Y1+Y,Z2=Z1+Z。The acquiring module 12 is further configured to obtain a spherical coordinate value and a radius value of a sphere generated by the object to be detected in a linked list, and obtain the spherical body in the world coordinate system according to a spherical coordinate value of the spherical body on the three-dimensional local coordinate system. The coordinate value of the spherical center is obtained, and the coordinate value (X1, Y1, Z1) of the origin of the three-dimensional local coordinate system in the world coordinate system is obtained. The formula for converting the coordinate value (X, Y, Z) in the three-dimensional local coordinate system to the coordinate value of the world coordinate system (X2, Y2, z2) is: X2 = X1 + X, Y2 = Y1 + Y, Z2 = Z1 + Z.

計算模組16用於計算待檢測的兩個物件所生成球體在世界座標係中的球心距。The calculation module 16 is configured to calculate the spherical center distance of the sphere generated by the two objects to be detected in the world coordinate system.

判斷模組18用於判斷球心距是否大於符測兩個物件所生成球體半徑值的和。若所述球心距不大於待測物件所 生成球體半徑值的和,則該兩個物件發生碰撞;若所述球心距大於待測物件所生成球體半徑值的和,則該兩個物件沒有發生碰撞。該判斷模組18還用於判斷所述鏈表中是否還存在待檢測的物件,若存在待檢測的物件,則繼續檢測鏈表中剩下的物件是否發生碰撞。The judging module 18 is configured to determine whether the center of the sphere is greater than a sum of the sphere radius values generated by the two objects. If the center of the ball is not greater than the object to be tested The sum of the sphere radius values is generated, and the two objects collide; if the sphere center distance is greater than the sum of the sphere radius values generated by the object to be tested, the two objects do not collide. The determining module 18 is further configured to determine whether there is still an object to be detected in the linked list, and if there is an object to be detected, continue to detect whether the remaining objects in the linked list collide.

如圖3所示,是本發明物件碰撞檢測方法較佳實施例的作業流程圖。在物件碰撞檢測之前,首先要對用戶需要檢測的物件在直角座標係上進行投影,然後用戶對該直角座標係上的投影進行框選。本實施例中,以對物件的俯視面投影到直角座標係上,並對該投影框選來說明該發明。As shown in Fig. 3, it is a flowchart of the operation of the preferred embodiment of the object collision detecting method of the present invention. Before the object collision detection, the object that the user needs to detect is first projected on the Cartesian coordinate system, and then the user selects the projection on the Cartesian coordinate system. In this embodiment, the plan view of the object is projected onto a rectangular coordinate system, and the invention is selected for the projection frame.

步驟S30,生成模組10在XY直角座標係上生成用戶所框選物件俯視面的矩形框,並在三維局部座標係中,根據該物件在Z軸的高度將該矩形框沿著Z軸進行延伸,生成框住該待檢測物件的長方體。Step S30, the generating module 10 generates a rectangular frame on the XY rectangular coordinate system to form a plane of the object selected by the user, and in the three-dimensional partial coordinate system, the rectangular frame is along the Z axis according to the height of the object at the Z axis. Extending, generating a rectangular parallelepiped that frames the object to be detected.

步驟S32,獲取模組12獲取最大範圍點和最小範圍點的座標值,該座標值不一定位於該長方體上。設座標值表示為(X,Y,Z),其中,最大範圍點的(X,Y,Z)值分別為該長方體上所有點座標值中最大的Xmax 、Ymax 、Zmax 值。同理,最小範圍點的(X,Y,Z)值分別為該長方體上所有點座標值上最小的Xmin 、Ymin 、Zmin 值。In step S32, the acquisition module 12 acquires a coordinate value of the maximum range point and the minimum range point, and the coordinate value is not necessarily located on the cuboid. Let the coordinate value be expressed as (X, Y, Z), where the (X, Y, Z) values of the maximum range point are the maximum X max , Y max , Z max values of all point coordinate values on the cuboid, respectively. Similarly, the (X, Y, Z) values of the minimum range points are the minimum X min , Y min , and Z min values of all point coordinates on the cuboid.

步驟S34,所述生成模組10生成一個球體,該球在三維局部座標係上的球心座標值為最大範圍點座標值與最小範圍點座標值和的一半,該球體的半徑值為最大範圍點與最小範圍點之間的距離的一半。Step S34, the generating module 10 generates a sphere, wherein the sphere center coordinate value on the three-dimensional local coordinate system is half of the sum of the maximum range point coordinate value and the minimum range point coordinate value, and the radius value of the sphere is the maximum range. Half the distance between the point and the smallest range point.

步驟S36,存儲模組14將所述球體在三維局部座標係上的球心座標值及半徑值保存至資料庫2的鏈表中。每個鏈表用於存儲一個整體物件中所有組成該整體物件的部分物件所生成球體的球心座標值與半徑值,例如:操作機台和操作人員分別被分成很多待檢測的物件,該資料庫2中有一個鏈表用於存儲所有組成該操作機台的物件生成的球體球心座標值和半徑值,另有一個鏈表用於存儲所有組成操作人員的物件生成的球體球心座標值和半徑值。In step S36, the storage module 14 saves the spherical coordinate value and the radius value of the sphere on the three-dimensional local coordinate system to the linked list of the database 2. Each linked list is used to store a spherical coordinate value and a radius value of a sphere generated by all the objects constituting the integral object in the overall object, for example, the operating machine and the operator are respectively divided into a plurality of objects to be detected, and the data is respectively In the library 2, there is a linked list for storing spherical spherical coordinates and radius values generated by all the objects constituting the operating machine, and a linked list for storing spherical spherical coordinates generated by all the components constituting the operator. And radius values.

步驟S38,所述獲取模組12根據球體在三維局部座標係上的球心座標值獲取該球體在世界座標係上的球心座標值,並獲取該三維局部座標係的原點在世界座標係中的座標值(X1,Y1,Z1)。三維局部座標係中的座標值(X,Y,Z)轉換為世界座標係(X2,Y2,Z2)的座標值的公式為:X2=X1+X,Y2=Y1+Y,Z2=Z1+Z。Step S38, the obtaining module 12 obtains the spherical coordinate value of the sphere on the world coordinate system according to the spherical center coordinate value of the sphere on the three-dimensional local coordinate system, and acquires the origin of the three-dimensional local coordinate system in the world coordinate system. Coordinate values in (X1, Y1, Z1). The formula for converting the coordinate value (X, Y, Z) in the three-dimensional local coordinate system to the coordinate value of the world coordinate system (X2, Y2, Z2) is: X2 = X1 + X, Y2 = Y1 + Y, Z2 = Z1 + Z.

步驟S40,計算模組16計算待檢測的兩個物件所生成球體在世界座標係中的球心距。In step S40, the calculation module 16 calculates the spherical center distance of the sphere generated by the two objects to be detected in the world coordinate system.

步驟S42,判斷模組18判斷球心距是否大於待測兩個物件所生成球體半徑值的和。In step S42, the determining module 18 determines whether the center of the sphere is greater than the sum of the sphere radius values generated by the two objects to be tested.

步驟S44,若所述球心距不大於待測物件所生成球體半徑值的和,則該兩個物件發生碰撞。Step S44, if the spherical distance is not greater than the sum of the sphere radius values generated by the object to be tested, the two objects collide.

步驟S46,於上述步驟S42中,若所述球心距大於待測物件所生成球體半徑值的和,則該兩個物件沒有發生碰撞。判斷模組18判斷鏈表中是否還有待測的物件。若所述鏈表中還存在符檢測的物件,則轉至步驟S38;若所述鏈 表中已經不存在待檢測的物件,則結束流程。Step S46, in the above step S42, if the spherical center distance is greater than the sum of the sphere radius values generated by the object to be tested, the two objects do not collide. The judging module 18 judges whether there are any objects to be tested in the linked list. If the object detected by the linked list is still present, go to step S38; if the chain If there is no object to be detected in the table, the process ends.

以上所述僅為本發明之較佳實施例而已,且已達廣泛之使用功效,凡其他未脫離本發明所揭示之精神下所完成之均等變化或修飾,均應包含在下述之申請專利範圍內。The above is only the preferred embodiment of the present invention, and has been used in a wide range of applications. Any other equivalent changes or modifications which are not departing from the spirit of the present invention should be included in the following claims. Inside.

電腦‧‧‧1Computer ‧‧1

資料庫‧‧‧2Database ‧ ‧

鍵盤‧‧‧3Keyboard ‧‧3

滑鼠‧‧‧4Mouse ‧‧4

顯示器‧‧‧5Display ‧‧5

生成模組‧‧‧10Generating module ‧‧10

獲取模組‧‧‧12Get the module ‧‧12

存儲模組‧‧‧14Storage module ‧‧14

計算模組‧‧‧16Computing module ‧‧16

判斷模組‧‧‧18Judgment module ‧‧18

於局部座標係中生成框住待測物件的長方體‧‧‧S30Generate a rectangular parallelepiped in the local coordinate system that frames the object to be tested. ‧‧S30

獲取最大範圍點和最小範圍點的座標值‧‧‧S32Get the coordinate value of the maximum range point and the minimum range point ‧‧S32

生成一個在局部座標係上固定的球體‧‧‧S34Generate a sphere fixed on the local coordinate system ‧‧‧S34

將球體的球心座標值與半徑值存儲於鏈表中‧‧‧S36Store the spherical center coordinate value and radius value of the sphere in the linked list. ‧‧S36

獲取待檢測的兩個物件所生成的球體在世界座標係中的球心座標值‧‧‧S38Obtain the spherical coordinate value of the sphere generated by the two objects to be detected in the world coordinate system ‧‧‧S38

計算該兩個待測物件所生成的球體在世界座標係中的球心距‧‧‧S40Calculate the spherical distance of the sphere generated by the two objects to be tested in the world coordinate system ‧‧S40

所述球心距是否大於兩個待測物件所生成的兩個球體的半徑值和‧‧‧S42Whether the spherical distance is greater than the radius values of the two spheres generated by the two objects to be tested and ‧‧S42

檢測結果為發生碰撞‧‧‧S44The test result is a collision ‧‧‧S44

鏈表中是否還存在待檢測的物件‧‧‧S46Whether there are still objects to be detected in the linked list ‧‧‧S46

圖1係本發明物件碰撞檢測系統較佳實施例之硬體架構圖。1 is a hardware structural diagram of a preferred embodiment of the object collision detecting system of the present invention.

圖2係本發明物件碰撞檢測系統較佳實施例的電腦之功能模組圖。2 is a functional block diagram of a computer of the preferred embodiment of the object collision detecting system of the present invention.

圖3係本發明物件碰撞檢測方法較佳實施例之作業流程圖。Fig. 3 is a flow chart showing the operation of the preferred embodiment of the object collision detecting method of the present invention.

於局部座標係中生成框住待測物件的長方體‧‧‧S30Generate a rectangular parallelepiped in the local coordinate system that frames the object to be tested. ‧‧S30

獲取最大範圍點和最小範圍點的座標值‧‧‧S32Get the coordinate value of the maximum range point and the minimum range point ‧‧S32

生成一個在局部座標係上固定的球體‧‧‧S34Generate a sphere fixed on the local coordinate system ‧‧‧S34

將球體的球心座標值與半徑值存儲於鏈表中‧‧‧S36Store the spherical center coordinate value and radius value of the sphere in the linked list. ‧‧S36

獲取待檢測的兩個物件所生成的球體在世界座標係中的球心座標值‧‧‧S38Obtain the spherical coordinate value of the sphere generated by the two objects to be detected in the world coordinate system ‧‧‧S38

計算該兩個待測物件所生成的球體在世界座標係中的球心距‧‧‧S40Calculate the spherical distance of the sphere generated by the two objects to be tested in the world coordinate system ‧‧S40

所述球心距是否大於兩個待測物件所生成的兩個球體的半徑值和‧‧‧S42Whether the spherical distance is greater than the radius values of the two spheres generated by the two objects to be tested and ‧‧S42

檢測結果為發生碰撞‧‧‧S44The test result is a collision ‧‧‧S44

鏈表中是否還存在待檢測的物件‧‧‧S46Whether there are still objects to be detected in the linked list ‧‧‧S46

Claims (8)

一種物件碰撞檢測系統,包括電腦及與該電腦相連的資料庫,該資料庫中存儲有待測物件,所述電腦包括:生成模組,用於在三維局部座標係中生成框住待測物件的長方體,還用於根據該長方體生成一個固定在三維局部座標係上的球體;獲取模組,用於根據球體在三維局部座標係上的球心座標值獲取該球體在世界座標係上的球心座標值;計算模組,用於計算待檢測的兩個物件所生成球體在世界座標係中的球心距;及判斷模組,用於判斷球心距是否大於待檢測的兩個物件所生成球體半徑值的和,若所述球心距不大於待測物件所生成球體半徑值的和,則該兩個物件發生碰撞;若所述球心距大於待測物件所生成球體半徑值的和,則該兩個物件沒有發生碰撞。An object collision detecting system includes a computer and a database connected to the computer, wherein the database stores the object to be tested, and the computer includes: a generating module, configured to generate a framed object to be tested in the three-dimensional local coordinate system The cuboid is also used to generate a sphere fixed on the three-dimensional local coordinate system according to the cuboid; and an acquisition module for acquiring the sphere of the sphere on the world coordinate system according to the spherical coordinate value of the sphere on the three-dimensional local coordinate system a coordinate coordinate value; a calculation module for calculating a spherical center distance of a sphere generated by two objects to be detected in a world coordinate system; and a judging module for determining whether the spherical center distance is larger than two objects to be detected Generating a sum of sphere radius values, if the sphere center distance is not greater than the sum of the sphere radius values generated by the object to be tested, the two objects collide; if the sphere center distance is greater than the sphere radius value generated by the object to be tested And, the two objects did not collide. 如申請專利範圍第1項所述之物件碰撞檢測系統,所述獲取模組,還用於在三維局部座標係上獲取最大範圍點座標值和最小範圍點座標值,最大範圍點的(X,Y,Z)值分別為該長方體上所有點座標值中最大的Xmin 、Ymin 、Zmin 值,最小範圍點的(X,Y,Z)值分別為該長方體上所有點座標值上最小的Xmin 、Ymin 、Zmin 值。The object collision detecting system according to claim 1, wherein the acquiring module is further configured to obtain a maximum range point coordinate value and a minimum range point coordinate value on the three-dimensional local coordinate system, and the maximum range point (X, The Y, Z) values are the maximum X min , Y min , and Z min values of all point coordinates on the cuboid, and the (X, Y, Z) values of the minimum range points are the smallest of all point coordinates on the cuboid. X min , Y min , Z min values. 如申請專利範圍第2項所述之物件碰撞檢測系統,所述球體在三維局部座標係上的球心座標值為最大範圍點座標值與最小範圍點座標值和的一半,該球體的半徑值為 最大範圍點與最小範圍點之間的距離的一半。The object collision detecting system according to claim 2, wherein the spherical center coordinate value of the sphere on the three-dimensional local coordinate system is half of a sum of a maximum range point coordinate value and a minimum range point coordinate value, and a radius value of the sphere body. for Half the distance between the maximum range point and the smallest range point. 如申請專利範圍第1項所述之物件碰撞檢測系統,所述電腦還包括存儲模組,用於將球體在三維局部座標係上的球心座標值及半徑值保存至資料庫的鏈表中,每個鏈表用於存儲一個整體物件中所有組成該整體物件的部分物件所生成球體的球心座標值與半徑值。The object collision detecting system according to claim 1, wherein the computer further comprises a storage module, configured to save the spherical coordinate value and the radius value of the sphere on the three-dimensional local coordinate system to the linked list of the database. Each linked list is used to store the spherical center coordinate value and the radius value of the sphere generated by all the objects in the overall object that make up the integral object. 一種物件碰撞檢測方法,該方法包括如下步驟:在三維局部座標係中生成框住待測物件的長方體;根據該長方體生成一個固定在三維局部座標係上的球體;根據該球體在所述三維局部座標係上的球心座標值獲取該球體在世界座標係上的球心座標值;計算待檢測的兩個物件所生成球體在世界座標係中的球心距;判斷球心距是否大於待測兩個物件所生成球體半徑值的和;若所述球心距不大於待測物件所生成球體半徑值的和,則該兩個物件發生碰撞;及若所述球心距大於待測物件所生成球體半徑值的和,則該兩個物件沒有發生碰撞。An object collision detecting method, the method comprising the steps of: generating a rectangular parallelepiped of the object to be tested in the three-dimensional local coordinate system; generating a sphere fixed on the three-dimensional local coordinate system according to the rectangular parallelepiped; according to the spherical body in the three-dimensional part The spherical coordinate value on the coordinate system obtains the spherical coordinate value of the sphere on the world coordinate system; calculates the spherical center distance of the sphere generated by the two objects to be detected in the world coordinate system; determines whether the spherical center distance is greater than the measured The sum of the sphere radius values generated by the two objects; if the spherical center distance is not greater than the sum of the sphere radius values generated by the object to be tested, the two objects collide; and if the spherical center distance is greater than the object to be tested The sum of the sphere radius values is generated, and the two objects do not collide. 如申請專利範圍第5項所述之物件碰撞檢測方法,在步驟在三維局部座標係中生成框住待測物件的長方體之後還包括:在三維局部座標係上獲取最大範圍點座標值和最小範圍點座標值,最大範圍點的(X,Y,Z)值分別 為該長方體上所有點座標值中最大的Xmax 、Ymax 、Zmax 值,最小範圍點的(X,Y,Z)值分別為該長方體上所有點座標值上最小的Xmin 、Ymin 、Zmin 值。For example, the object collision detecting method described in claim 5, after the step of generating a rectangular parallelepiped of the object to be tested in the three-dimensional local coordinate system, the method further comprises: obtaining a maximum range point coordinate value and a minimum range on the three-dimensional local coordinate system. Point coordinate value, the (X, Y, Z) values of the maximum range point are the maximum X max , Y max , Z max values of all point coordinate values on the cuboid, and the (X, Y, Z) values of the minimum range point They are the minimum values of X min , Y min , and Z min for all point coordinates on the cuboid. 如申請專利範圍第6項所述之物件碰撞檢測方法,所述球體在三維局部座標係上的球心座標值為最大範圍點座標值與最小範圍點座標值和的一半,該球體的半徑值為最大範圍點與最小範圍點之間的距離的一半。The method for detecting object collision according to claim 6, wherein the spherical coordinate value of the sphere on the three-dimensional local coordinate system is half of a sum of a maximum range point coordinate value and a minimum range point coordinate value, and a radius value of the sphere body. It is half the distance between the maximum range point and the minimum range point. 如申請專利範圍第5項所述之物件碰撞檢測方法,在步驟根據該長方體生成一個固定在三維局部座標係上的球體之後還包括:將該球體在三維局部座標係上的球心座標值及半徑值保存至資料庫的鏈表中,每個鏈表用於存儲一個整體物件中所有組成該整體物件的部分物件所生成球體的球心座標值與半徑值。The object collision detecting method according to claim 5, after the step of generating a sphere fixed on the three-dimensional local coordinate system according to the rectangular parallelepiped further comprises: a spherical center coordinate value of the spherical body on the three-dimensional local coordinate system and The radius values are stored in a linked list of the database, and each linked list is used to store the spherical coordinate values and radius values of the spheres generated by all the objects in the overall object that make up the integral object.
TW97112270A 2008-04-03 2008-04-03 System and method for checking collision of objects TWI387473B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97112270A TWI387473B (en) 2008-04-03 2008-04-03 System and method for checking collision of objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97112270A TWI387473B (en) 2008-04-03 2008-04-03 System and method for checking collision of objects

Publications (2)

Publication Number Publication Date
TW200942303A TW200942303A (en) 2009-10-16
TWI387473B true TWI387473B (en) 2013-03-01

Family

ID=44868593

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97112270A TWI387473B (en) 2008-04-03 2008-04-03 System and method for checking collision of objects

Country Status (1)

Country Link
TW (1) TWI387473B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107233733B (en) * 2017-05-11 2018-07-06 腾讯科技(深圳)有限公司 The treating method and apparatus of target object

Also Published As

Publication number Publication date
TW200942303A (en) 2009-10-16

Similar Documents

Publication Publication Date Title
US11301954B2 (en) Method for detecting collision between cylindrical collider and convex body in real-time virtual scenario, terminal, and storage medium
Nowacki et al. Capabilities of arcore and arkit platforms for ar/vr applications
JP6125108B1 (en) Method, apparatus and terminal for simulating sound in a virtual scenario
JP6626223B2 (en) Indoor ranging method
JP6001562B2 (en) Use of 3D environmental models in game play
US11620857B2 (en) Method, device, and medium for determining three-dimensional position of skeleton using data acquired by multiple sensors
JP6793151B2 (en) Object tracking device, object tracking method and object tracking program
US9824478B2 (en) Dynamic remapping of components of a virtual skeleton
JP6263917B2 (en) Information processing apparatus, information processing method, and computer program
TW201335892A (en) System and method for measuring special boundaries
WO2021022573A1 (en) Vibration sense similarity evaluation method and apparatus, and storage medium
JP2018206025A (en) Information processing device and information processing method
TWI387473B (en) System and method for checking collision of objects
CN104573144A (en) System and method for simulating offline point cloud of measuring equipment
CN101546435B (en) System and method for detecting article collision
JP2019219248A (en) Point group processor, method for processing point group, and program
CN115035042A (en) Evaluation method and device for motion migration model, electronic device and storage medium
JP2008181124A5 (en)
US8704831B2 (en) Irradiance rigs
US9858364B2 (en) Computing device and method for processing point clouds
CN116309712B (en) Functional motion analysis system and method based on depth camera
JP6429240B2 (en) Shape detection apparatus, shape detection method, and program
JP2003271687A (en) Device and method for detecting interference model and memory medium
JP2023110212A (en) Point cloud processing apparatus, point cloud processing method, and program
Dharma et al. Interaction between fluid and solid body surfaces in fluid simulation using material-point method

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees