WO2020038237A1 - Method and apparatus for selecting absorption element of rotation element, and rotary absorption method and apparatus - Google Patents

Method and apparatus for selecting absorption element of rotation element, and rotary absorption method and apparatus Download PDF

Info

Publication number
WO2020038237A1
WO2020038237A1 PCT/CN2019/099799 CN2019099799W WO2020038237A1 WO 2020038237 A1 WO2020038237 A1 WO 2020038237A1 CN 2019099799 W CN2019099799 W CN 2019099799W WO 2020038237 A1 WO2020038237 A1 WO 2020038237A1
Authority
WO
WIPO (PCT)
Prior art keywords
rotation
adsorption
scene
point
position information
Prior art date
Application number
PCT/CN2019/099799
Other languages
French (fr)
Chinese (zh)
Inventor
黄腾霄
林德熙
Original Assignee
广州视源电子科技股份有限公司
广州视睿电子科技有限公司
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 广州视源电子科技股份有限公司, 广州视睿电子科技有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2020038237A1 publication Critical patent/WO2020038237A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the present application relates to the field of intelligent interaction technology, for example, to a method for selecting an adsorbed element of a rotating element, an apparatus for selecting an adsorbed element for a rotating element, an apparatus for rotating adsorption, an apparatus for rotating adsorption, an interactive smart tablet, and a computer-readable storage medium.
  • interactive smart tablet is a multifunctional integrated projector, electronic whiteboard, curtain, audio, television, video conference terminal
  • An integrated intelligent interaction device that controls the content displayed on the display panel of the interactive smart tablet through intelligent interaction technology to realize human-computer interaction.
  • the embodiments of the present application provide a method for selecting a rotating element adsorption element, a rotating element adsorption element selecting device, a rotating adsorption method, a rotating adsorption device, an interactive smart tablet, and a computer-readable storage medium, which solves the problem of low operation efficiency in the related technology. problem.
  • an embodiment of the present application provides a method for selecting an adsorbed element of a rotating element, including:
  • the adsorption element of the rotating element is selected from the scene elements according to the adsorption region.
  • a spin adsorption method including:
  • the rotating element is rotationally adsorbed to the adsorbing element.
  • an adsorption element selection device for rotating elements including:
  • a rotation element selection module configured to select a rotation element and determine a rotation center of the rotation element
  • a position information acquisition module configured to acquire position information of the rotation element and the rotation center
  • An adsorption area calculation module configured to calculate an adsorption area of the rotation element according to the position information of the rotation element and the rotation center;
  • the adsorption element selection module is configured to select an adsorption element of the rotating element from a scene element according to the adsorption region.
  • a rotary adsorption device including:
  • An element determination module configured to select an adsorption element of a rotation element according to the method for selecting an adsorption element of a rotation element according to any one of the above embodiments;
  • the element adsorption module is configured to rotationally adsorb the rotating element to the adsorbed element.
  • an interactive smart tablet which includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor implements any of the foregoing when the computer program is executed. The method described in the examples.
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the foregoing embodiments is implemented.
  • FIG. 1 is a schematic diagram of an application scenario of a method for selecting an adsorbed element of a rotating element in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for selecting an adsorbed element of a rotating element in an embodiment of the present application
  • FIG. 3 (a) is a schematic diagram of a scene position reference of a rotation point and a scene point according to an embodiment of the present application
  • FIG. 3 (b) is another schematic view of scene position reference of a rotation point and a scene point in the embodiment of the present application;
  • FIG. 4 (a) is a schematic diagram of a scene position reference of a rotation point and a scene line according to an embodiment of the present application
  • FIG. 4 (b) is another schematic diagram of a scene position reference of a rotation point and a scene line in the embodiment of the present application;
  • FIG. 4 (c) is another schematic diagram of a scene position reference according to a rotation point and a scene line in an embodiment of the present application;
  • FIG. 5 (a) is a schematic diagram of a scene position reference of a rotation line and a scene point according to an embodiment of the present application
  • FIG. 5 (b) is another schematic diagram of a scene position reference of a rotation line and a scene point in the embodiment of the present application;
  • FIG. 5 (c) is another schematic view of scene position reference of a rotation line and a scene point in the embodiment of the present application.
  • FIG. 6 (a) is a schematic diagram of a scene position reference of a rotation line and a scene line according to an embodiment of the present application
  • FIG. 6 (b) is another schematic diagram of a scene position reference of a rotation line and a scene line according to an embodiment of the present application
  • FIG. 6 (c) is another schematic view of scene position reference of a rotation line and a scene line according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an adsorption element selection device for rotating elements in an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an interactive smart tablet according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an application scenario of the method for selecting a rotation element adsorption element in an embodiment of the present application.
  • the application scenario may include
  • the intelligent interactive device may be a computer, a tablet, or an interactive smart tablet.
  • the interactive smart tablet may be a device that controls the content displayed on the display tablet of the interactive smart tablet and realizes the integration of human-computer interaction through touch technology.
  • Equipment, interactive smart tablet integrates one or more functions such as projector, electronic whiteboard, curtain, sound, TV and conference terminal.
  • the user can perform operations such as editing scene elements involved in various applications such as teaching courseware making software installed on the intelligent interactive device.
  • the interactive smart tablet 100 is used as an example to describe the application scenario.
  • the interactive smart tablet 100 can display scene elements in applications such as teaching courseware production software through the interactive smart tablet display tablet 110, so that the user can
  • the displayed scene elements perform operations such as panning, adding, and deleting.
  • the user needs to rotate the rotation point R to the scene point P.
  • the interactive smart tablet 100 can determine its rotation center D according to the rotation point R specified by the user to rotate the rotation point R.
  • the element operation method in the related technology of the interactive smart tablet 100 requires the user to adjust the rotation point R near the position of the scene point P multiple times before changing the position.
  • the rotation point R is rotated to the position of the scene point P, which results in low operation efficiency on multiple scene elements.
  • FIG. 2 is a schematic flowchart of a method for selecting a rotating element adsorption element according to an embodiment of the present application. The method can be applied as shown in FIG. 1.
  • the method for selecting an adsorbed element of the rotating element may include S110 to S140.
  • the rotation element refers to the element used for the rotation operation in the scene.
  • the scene refers to the area used to carry the scene element.
  • scene elements can be displayed, such as point elements and line elements.
  • Line elements can be Is a line segment element, such as one side of a triangle or a ruler side;
  • the rotation center refers to the rotation center when the rotation element is rotated. For example, if the rotation element is rotated in a circle, the rotation center corresponds to the center of the circle.
  • the user may select a rotation element among multiple scene elements displayed by the interactive smart tablet 100, or may use a scene element newly added to the scene as a rotation element.
  • the interactive smart tablet 100 may select an element selected by the user as a rotation element. And determine its center of rotation.
  • This step is to obtain the position information of the rotation element and the rotation center of the rotation element after selecting the rotation element and determining the rotation center of the rotation element.
  • the position information refers to the position information of the rotation element and the rotation center in the scene. For example, information such as the coordinates of the rotation element in the scene, the coordinates of the rotation center in the scene, or the relative position relationship between the rotation element and the rotation center.
  • S130 Calculate the adsorption area of the rotating element according to the position information of the rotating element and the rotation center.
  • adsorption means that when it is close to the target position, it can be attracted like a magnet.
  • the target position is assumed to be the position of the scene point P.
  • the rotation point R is rotated close to the scene point P, the user hopes that the rotation point R will be absorbed by the scene point P.
  • the adsorption region refers to a region that can be used for adsorption by a specific scene element in a scene
  • the adsorption region of a rotation element refers to a region that can be used for adsorption by a rotation element in a scene.
  • the interactive smart tablet 100 can calculate the adsorption area of the rotation element according to the position information of the rotation element and its rotation center, and the adsorption area is used to delimit the selection range for the rotation element selection.
  • the adsorption area may include The area that the rotating element passes through during the rotation. This area can be calculated based on the relative distance between the rotating element and the center of rotation.
  • the interactive smart tablet 100 selects a specific scene element from the scene elements as the adsorption element of the rotating element according to the adsorption area obtained in S130.
  • the interactive smart tablet 100 can select an adsorption element according to the overlap degree of the scene element and the adsorption region, for example, using the scene element located in the adsorption region as the adsorption element of the rotating element.
  • the adsorbed element refers to the elements in the scene element that can be adsorbed by the rotating element, including elements of points or lines.
  • a scene element may include multiple points and lines, and the adsorbed elements can perform the points or lines among the elements.
  • Adsorption taking a scene composed of a two-dimensional plane as an example, these scene elements are scene elements that do not move on the two-dimensional plane, and can be used to rotate elements for adsorption, such as an edge of a triangle in a two-dimensional plane, and
  • the rotation element can be a ruler's tick mark, and one side of the triangle can be used for the ruler's tick mark for adsorption.
  • the adsorption element selection method for a rotating element in the above embodiment selects a rotating element and determines its rotation center, obtains position information of the rotation element and the rotation center, calculates an adsorption region of the rotation element based on the position information, and based on the adsorption region, selects a scene element from the scene element. Selecting the adsorption element in the rotation element enables the selection of the adsorption element of the rotation element when the rotation element is rotated, and can be used to adsorb the rotation element when it is rotated, so that the rotation element can be quickly rotated to the adsorption element during the rotation process.
  • the position of the rotating element overcomes the problem that the related technology needs to adjust the position of the rotating element multiple times, and improves the operating efficiency of the rotating element.
  • determining the calculation of the adsorption area of the rotation element according to the position information of the rotation element and the rotation center in S130 may include:
  • the rotation path of the rotation element is calculated according to the position information of the rotation element and the rotation center; the adsorption area of the rotation element is determined according to the rotation path.
  • the rotation path refers to the motion trajectory formed during the rotation.
  • the rotation path of the rotation element refers to the motion trajectory of the rotation element when it rotates in the scene.
  • the rotation path can be calculated by the interactive smart tablet 100 and then passed through the display tablet 110 The display makes the rotation path more intuitive and more visualized.
  • the interactive smart tablet 100 can obtain the position information of the rotation element and the rotation center such as the relative distance in real time, calculate the rotation path of the rotation element according to the position information, and then determine the adsorption area of the rotation element according to the rotation path.
  • the rotation path can be set as an adsorption region, and the adsorption region is displayed on the display panel 110, so that the user can intuitively see the location of the adsorption region, which is beneficial for selecting an adsorption element.
  • determining the adsorption region of the rotation element according to the rotation path in the above embodiment may include:
  • the path error value refers to an allowable error value of the rotation path, and the path error value is set to take into consideration that when the rotation element is rotated, the rotation path is likely to have a certain deviation from the path expected by the user.
  • the interactive smart tablet 100 can set the adsorption area of the rotation element according to the path error value and the rotation path. For example, the line identifying the rotation path is widened according to the path error value, which is beneficial to improve the path error value during the rotation of the rotation element. The error tolerance of the rotation path will more accurately attract the rotation element to the scene element that the user wants to attract.
  • the path error value can be set according to the screen size of the interactive smart device 100.
  • the calculation method can be the screen size divided by 375. If this value is set too large, it is easy for the rotating elements to adsorb undesired scene elements during the rotation process.
  • the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
  • the candidate element refers to the scene element located in the adsorption area
  • the scene element located in the adsorption area here is not limited to the scene element that completely falls into the adsorption area, but may also have a certain overlapping area with the adsorption area.
  • Scene element; rotation direction refers to the movement of the rotation element when performing a rotation operation in the scene, taking the circular rotation as an example.
  • the rotation direction includes clockwise and counterclockwise directions.
  • the interactive smart tablet 100 can obtain scene elements located in the adsorption area and set them as candidate elements.
  • the movement direction of the rotating element during the rotation process is used as the rotation direction of the rotation element, and the adsorption element is selected from the candidate elements according to the rotation direction. .
  • This embodiment considers that when the user rotates a rotating element, the rotating element will be rotated in a certain direction. For example, if the rotating element is rotated in a counterclockwise direction, you can select from the alternative elements. Adopting a matched element in the counterclockwise direction as an adsorbed element is beneficial to the rotating element to rotate and adsorb to the position of the adsorbed element quickly. However, if a candidate element in the clockwise direction is selected, it will affect the user's rotating adsorption operation on the rotating element, which is easy. The rotating element is adsorbed into the reverse scene element, so that the user needs to re-adsorb the rotating element, which not only reduces the operation efficiency but also reduces the user experience.
  • selecting the adsorption element from the candidate elements according to the rotation direction in the above embodiment may include:
  • the rotation angle of the candidate element and the rotation element is determined according to the rotation direction of the rotation element; the adsorption element is selected from the candidate elements according to the rotation angle.
  • the rotation angle between the candidate element and the rotation element refers to the angle formed by the candidate element, the rotation center, and the rotation element.
  • the interactive smart tablet 100 may sequentially determine a rotation angle formed between a plurality of candidate elements and the rotation element according to a rotation direction of the rotation element, and select an adsorption element among the plurality of candidate elements according to the rotation angle. Considering that multiple candidate elements and rotating elements actually form multiple included angles, the candidate elements corresponding to certain specific included angles may not be suitable as adsorption elements. The solution of this embodiment can improve the efficiency and accuracy of the selection of the adsorbed elements. Sex.
  • the interactive smart tablet 100 can also display these candidate elements and the corresponding angles of the candidate elements through the display tablet 110 to provide the user with a choice, and select the candidate element that needs to be used as an adsorbed element.
  • selecting the adsorption element from the candidate elements according to the rotation angle in the above embodiment may include:
  • the rotation angle is compared with a set adsorption angle threshold; in response to the rotation angle being smaller than the adsorption angle threshold, an adsorption element is selected from the candidate elements.
  • the suction angle threshold refers to an angle threshold used for filtering the rotation angle.
  • the interactive smart tablet 100 can obtain the suction angle threshold set by the user in advance, and compare the rotation angle of each candidate element and the rotation element with the suction angle threshold. If the rotation angle is less than the suction angle threshold, the backup corresponding to the rotation angle is prepared. Select the adsorbed element from the selected elements.
  • the technical solution of the present invention is to select an adsorption element from candidate elements whose rotation angle is less than the threshold of the adsorption angle, which is beneficial to improving the efficiency and accuracy of the selection of the adsorption element.
  • the interactive smart tablet 100 may also display the selected adsorbed element and its corresponding rotation angle in a list form through the display tablet 110, so that the selected adsorbed element is displayed more intuitively and the user experience is improved.
  • the distance between the rotation point and the rotation center is calculated according to the position information of the rotation point and the rotation center; the rotation circle of the rotation point is calculated according to the distance between the rotation point and the rotation center; and the adsorption area of the rotation point is determined according to the rotation circle.
  • FIG. 3 (a) is a schematic diagram of a scene position reference of a rotation point and a scene point in the embodiment of the present application.
  • the scene includes a rotation point R, a rotation center D, and a plurality of scene point elements P, where
  • the scene point element P is a point element in the scene element;
  • the rotation circle C refers to a circle formed by the rotation point R when rotated.
  • the interactive smart tablet 100 can calculate the distance between the rotation point R and the rotation center D according to the coordinates of the rotation point R and the rotation center D.
  • the coordinates of the rotation point R are (x 1 , y 1 ), and the coordinates of the rotation center D Is (x 2 , y 2 )
  • the distance d between the rotation point R and the rotation center D can be expressed as According to the distance d, the rotation circle C of the rotation point can be calculated, and then the rotation circle C can be set as the adsorption area of the rotation point R.
  • the purpose of d is to determine the relative distance between two points, so in order to reduce the number of open operations and improve the operation efficiency, the square of the distance d can be used to correspond to the distance between the rotation point R and the rotation center D.
  • the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
  • a scene point element belonging to a point element is determined in a scene element, and an adsorption element is selected in the scene point element; wherein the position information of the scene point element includes the position of the scene point element coordinate.
  • the distance d of each scene point element from the rotation center can be calculated separately by the following distance formula:
  • the coordinates of the scene point elements can be expressed as (x 1 , y 1 ), and the coordinates of the rotation center can be expressed as (x 2 , y 2 ).
  • the distance can be squared.
  • the distance d between each scene point element and the center of rotation which can reduce many square root operations and improve computing efficiency.
  • FIG. 3 (b) is another schematic view of the scene position of the rotation point and scene point in the embodiment of the present application. scene point elements P 1, P 2, P 3 , P 4 and P 5.
  • it can traverse the scene point elements P 1, P 2, P 3 , P 4 and P 5, take n-th element P n, connected to P n and the rotation center D, and the rotation point R and center of rotation D , Make two vectors with Find the vector with P ⁇ angle, if the angle P ⁇ satisfies the threshold value is smaller than the angle [alpha] is set adsorbed, then can be placed in alternative elements P n P d in the collection.
  • the following calculation methods can be used to select scene point elements that satisfy the rotation angle among the candidate elements:
  • the nth element is P dn , remove all elements that do not meet the value of the cross product operation greater than 0 and the rotation angle is greater than the adsorption angle threshold ⁇ .
  • the candidate element below can be used as an adsorption element, and the rotation angle corresponding to the adsorption element can be displayed and output.
  • the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
  • the scene line element is an element belonging to a line segment in the scene.
  • the position information of the scene line element may include the position coordinates of each point in the scene line element.
  • the intersecting element refers to the element that overlaps the adsorption area in the scene line element. If the scene line element is located in the adsorption area, the scene line element is an intersecting element. If a part of the scene line element is located in the adsorption area, the part element is an intersecting element. Among the acquired intersecting elements, the adsorption element of the rotation point is selected.
  • the scene line element belonging to the line element is determined in the scene element, and the adsorption element of the rotation point is selected according to the intersection of the scene line element and the adsorption area, that is, the rotation circle.
  • FIG. 4 (a) is a schematic diagram of a scene position reference diagram of a rotation point and a scene line according to an embodiment of the present application.
  • the scene includes a rotation point R, a rotation center D, and scene line elements P 1 and P 2 And P 3 , as shown in FIG. 4 (b),
  • FIG. 4 (b) is another schematic diagram of scene position reference of the rotation point and the scene line in the embodiment of the present application.
  • the scene line element P n satisfies the attraction of the rotation point R, then the scene line element P n must have at least one intersection with the rotation circle C of the rotation point R. If the scene line element P n and the rotation circle C exist, There is no intersection point, and it can be considered that the rotation point R cannot be attracted to the scene line element P n . You can traverse the scene line elements P 1 , P 2 and P 3 , the nth element is P n , and find the element P n as the intersection element A 1 , A 2 and A 3 of the line segment and the rotation circle C by a general algorithm.
  • the set of intersecting elements is A.
  • the rotation angle of the intersecting element and the rotation point R can be judged. If the rotation angle is too large or the rotation direction does not match, the rotation point R cannot be considered Scene line element P n .
  • FIG. 4 (c) is another schematic view of scene position reference of the rotation point and the scene line in the embodiment of the present application. It can traverse the set A of intersecting elements, and the nth element of the set A is A n , Take the vector And vector P ⁇ angle, if the angle P ⁇ is less than the threshold value [alpha] suction angle, and the angle P ⁇ and rotational directions are the same, the scene can be placed in line element P n P d in the set of alternative elements, and records the scene The intersection A n of line elements.
  • the following calculation methods can be used to select scene line elements that satisfy the rotation angle among the candidate elements:
  • intersection element corresponding to the nth element is A n , and remove all intersections that do not meet the value of the cross product operation greater than 0 and the rotation angle is greater than the adsorption angle threshold ⁇ .
  • the last remaining intersection element can be used as an adsorption element, and the rotation angle corresponding to the adsorption element can be displayed and output.
  • the position information of the two endpoints of the rotation line is obtained according to the position information of the rotation line.
  • the distances between the two endpoints and the rotation center are calculated according to the position information of the two endpoints and the position information of the rotation center.
  • the distance determines the rotation circle of the rotation line; the adsorption area of the rotation line is obtained according to the rotation circle.
  • FIG. 5 (a) is a schematic diagram of a scene position reference of a rotation line and a scene point in the embodiment of the present application.
  • the scene includes a rotation line L, a rotation center D, and a plurality of scene point elements P, such as
  • FIG. 5 (b) is another schematic view of a scene position reference of a rotation line and a scene point in the embodiment of the present application.
  • the rotation element is a rotation line and the rotation line L is on a straight line.
  • the suction area in the case of passing through the rotation center D.
  • the rotation line refers to a rotation line segment for rotation in the scene.
  • the position information of the rotation line includes the position coordinates of each point on the rotation line in the scene.
  • the rotation circle refers to the two endpoints of the rotation line.
  • the rotation circles respectively formed with the rotation center are shown in FIG. 5 (c).
  • FIG. 5 (c) is another schematic diagram of scene position reference of the rotation line and scene point in the embodiment of the present application.
  • the rotation circles C a and C b formed by the two end points L a and L b of the rotation line L and the rotation center D are shown.
  • the rotation circumferences C a and C b can be determined by the distance between the end points L a and L b and the rotation center D.
  • the area formed between the rotation circles C a and C b can be used as the rotation circle of the rotation line, and the rotation circle can be used as the adsorption area of the rotation line.
  • the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
  • a scene point element belonging to a point element is determined in the scene element, and an adsorption element is selected in the scene point element; wherein the position information of the scene point element includes the scene point element.
  • Position coordinates
  • the distance d of each scene point element from the rotation center can be calculated by the following distance formula:
  • the coordinates of the scene point elements can be expressed as (x 1 , y 1 ), and the coordinates of the rotation center can be expressed as (x 2 , y 2 ).
  • the distance can be squared.
  • the distance d between each scene point element and the center of rotation which can reduce many square root operations and improve computing efficiency.
  • the scene elements and the rotation center point of the distance d may be determined that the scene point in rotation of the ring element is located, with reference to FIG. 5 (c), the distance element is assumed that scene point D between the rotation center and the rotation center terminal L a is greater than D
  • the distance between the end point L b and the rotation center D, the scene point element is considered as the scene element in the adsorption area, that is, P 1 , P 4 and P 5 in FIG. 5 (c) are described
  • the element of the scene point is adsorbed in the region, and then the adsorbed element of the rotation line can be selected from P 1 , P 4, and P 5 .
  • Angle as shown in FIG 5 (c) may be formed according to the scene point elements P 1, P 4 and P 5 scene point pair and the rotating elements P 1, P 4 and P 5 for further screening, wherein the rotary element scene point
  • the angle formed by the line can be represented by the angle formed by the scene point element, the center of rotation, and the endpoint of the line of rotation.
  • the scene point elements P 1 , P 4 and P 5 can be traversed, the vector of the n-th element P n and the rotation center D Let the vector of La and rotation center D be Compute vector And vector
  • the included angle P ⁇ if the included angle P ⁇ is less than the adsorption angle threshold ⁇ , then the scene point element P n can be used as the adsorption element, and the corresponding included angle P ⁇ can be used as the rotation angle of the rotation point in
  • the display on the display tablet 110 shown in FIG. 1 is convenient for selecting multiple scene point elements and rotation angles corresponding to the scene point elements.
  • an adsorption element may be selected among P 1 , P 4, and P 5 according to the rotation direction of the rotation line.
  • the vector of La and rotation center D be A vector of the n-th element P n and the rotation center D in the scene point elements P 1 , P 4, and P 5 By vector And vector Judging the direction, it can be known whether the scene point element P n is in the rotation direction of the rotation line L. If P n is not in the rotation direction of the rotation line L, then this P n can be excluded. Assuming that the rotation line L in FIG. 5 (c) is rotated counterclockwise, then through the current calculation, the scene point element P n in FIG. 5 (c) can be excluded, and the scene in the rotation direction of the rotation line L can be The point elements P 1 and P 4 are selected as adsorbed elements.
  • the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
  • the scene line element includes elements belonging to a line segment in the scene
  • the position information of the scene line element includes the position coordinates of each point in the scene line element
  • the intersecting element refers to an area that overlaps with the adsorption area in the scene line element.
  • the scene line element belonging to the line element is determined in the scene element, and the adsorption element at the rotation point is selected according to the intersection of the scene line element and the adsorption area, that is, the rotation circle.
  • FIG. 6 (a) is a schematic diagram of a scene position reference of a rotation line and a scene line in the embodiment of the present application.
  • the scene includes a rotation line L and a rotation center D And scene line elements L 1 , L 2 , L 3 and L 4 , as shown in FIG. 6 (b),
  • FIG. 6 (b) is another schematic view of scene position reference of the rotation line and the scene line in the embodiment of the present application.
  • the position information of the scene line elements can obtain the intersecting elements of each scene line element and the adsorption area, such as the overlapping line segment of each scene line element and the rotating circle, etc.
  • the adsorption element can be selected from multiple intersecting elements.
  • the scene line element L 1 does not have an extension line passing through the rotation center D, the scene line element L 1 can be excluded, and because the scene line elements L 2 and L 4 are not rotated.
  • the circle C a and the rotation circle C b it is easy to see that no matter how the rotation line L rotates, it cannot overlap with L 2 or L 4 , so L 2 and L 4 can be excluded.
  • an algorithm for calculating whether a scene line element is in a rotating circle can be converted into an interval containing relationship.
  • the set of hypotheses P L contains L 1, L 2, L 3, and L 4
  • two end points set P L of the n-th line elements of the scene respectively n PL and PL na PL nb, respectively, from the center of rotation
  • D is d pa d pb
  • seeking whether PL n L in a rotary line rotation of the ring may be converted for the sake d a, d b, and d pa, d pb question of whether an overlapping portion is present, can be d a, d b, and d pa, d pb represented on the number line, if the interval [d a, d b ] and the interval [d pa pb
  • FIG. 7 is a schematic structural diagram of a rotating element adsorption element selection device according to an embodiment of the present application, including a rotation element selection module 101 and position information.
  • the rotation element selection module 101 is configured to select a rotation element and determine a rotation center of the rotation element
  • a position information acquisition module 102 configured to acquire position information of the rotation element and the rotation center
  • the adsorption region calculation module 103 is configured to calculate the adsorption region of the rotation element according to the position information of the rotation element and the rotation center;
  • the adsorption element selection module 104 is configured to select an adsorption element of the rotating element from a scene element according to the adsorption region.
  • the above-mentioned rotating element adsorption element selection device enables the selection of the adsorption element of the rotation element when the rotation element is rotated, and can be used to adsorb the rotation element when the rotation element is rotated, so that the rotation element can be quickly rotated during the rotation process.
  • Rotating to the position of the adsorbed element overcomes the problem that the related technology needs to adjust the position of the rotating element multiple times, and improves the operating efficiency of the rotating element.
  • the adsorption element selection module 104 may include:
  • An element setting unit configured to set a scene element in the adsorption area as a candidate element; a direction determination unit configured to determine a rotation direction of the rotation element; a first selection unit configured to be selected from the rotation direction according to the rotation direction The adsorption element is selected from the candidate elements.
  • the first selecting unit may include:
  • An angle determination unit configured to determine a rotation angle of the candidate element and the rotation element according to a rotation direction of the rotation element; a second selection unit configured to select the adsorption among the candidate elements according to the rotation angle element.
  • the element selection unit may include:
  • a threshold comparing unit configured to compare the rotation angle with a set adsorption angle threshold; a third selection unit configured to select the adsorption from the candidate elements in response to the rotation angle being smaller than the adsorption angle threshold element.
  • the adsorption area calculation module 103 may include:
  • the path calculation unit is configured to calculate a rotation path of the rotation element according to the position information of the rotation element and the rotation center; and the region determination unit is configured to determine an adsorption region of the rotation element according to the rotation path.
  • the area determining unit may include:
  • the error obtaining unit is configured to obtain a set path error value; and the area setting unit is configured to set an adsorption region of the rotation element according to the path error value and a rotation path.
  • the rotation element is a rotation point; the adsorption area calculation module 103 is configured to:
  • the adsorption element selection module 104 is configured to:
  • the adsorption element selection module 104 is configured to:
  • Determining a scene line element in the scene element obtaining position information of the scene line element; obtaining an intersection element of the scene line element and an adsorption area according to the position information of the scene line element; selecting from the crossing element Adsorption element at the rotation point.
  • the rotation element is a rotation line; the adsorption area calculation module 103 is configured to:
  • the adsorption element selection module 104 is configured to:
  • the adsorption element selection module 104 is configured to:
  • Determining a scene line element in the scene element obtaining position information of the scene line element; obtaining an intersecting element of the scene line element and the adsorption area according to the position information of the scene line element; from the intersecting element
  • the adsorption element of the rotation line is selected.
  • adsorption element selection device of the rotating element please refer to the limitation on the selection method of the adsorption element of the rotation element described above.
  • the technical characteristics and effects described in the embodiment of the selection method of the adsorption element of the rotation element are applicable to the rotation element In the embodiment of the adsorption element selection device, details are not described herein again.
  • Each module in the above-mentioned rotating element adsorption element selection device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • Each of the above modules may be embedded in a processor in a hardware form or independent of a processor in a computer device, or may be stored in a memory of a computer device in a software form, so that the processor can call and execute the operations corresponding to each of the above modules.
  • a spin adsorption method may include the following steps:
  • the adsorbed element of the rotated element is selected; the rotated element is adsorbed to the adsorbed element by rotation.
  • the rotation adsorption method of this embodiment can be applied to the interactive smart tablet 100 shown in FIG. 1.
  • the user can operate the displayed scene elements through the display tablet 110 of the interactive smart tablet 100, and the interactive smart tablet 100 can select the user.
  • the scene element is selected as a rotation element, and the rotation element may be a point element or a line element.
  • the interactive smart tablet 100 selects the rotation element among the scene elements according to the adsorption element selection method for a rotation element according to any one of the above embodiments. And quickly adsorb the rotating element to the position of the adsorbed element when the rotating element is rotated close to the adsorbed element.
  • a rotary adsorption device which may include:
  • An element determination module configured to select an adsorption element of a rotation element according to the method for selecting an adsorption element of a rotation element according to any one of the above embodiments;
  • the element adsorption module is configured to rotationally adsorb the rotating element to the adsorbed element.
  • the above rotation adsorption method and device can first select the adsorption element of the rotation element when rotating the rotation element, so that during the rotation of the rotation element, the rotation element can be quickly rotated and adsorbed to the position of the adsorption element, The rotation adsorption operation of the rotating elements is realized, and the operation efficiency of the rotating elements is improved.
  • Each module in the above-mentioned rotary adsorption device can be realized in whole or in part by software, hardware, and a combination thereof.
  • Each of the above modules may be embedded in a processor in a hardware form or independent of a processor in a computer device, or may be stored in a memory of a computer device in a software form, so that the processor can call and execute the operations corresponding to each of the above modules.
  • an interactive smart tablet is provided.
  • the internal structure diagram of the interactive smart tablet can be shown in FIG. 8.
  • FIG. 8 is a schematic structural diagram of the interactive smart tablet in the embodiment of the present application.
  • the interactive smart tablet may include a communication system. Bus-connected processors, memories, network interfaces, displays and input devices.
  • the processor of the interactive smart tablet is used to provide computing and control capabilities.
  • the memory of the interactive smart tablet includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for running an operating system and computer programs in a non-volatile storage medium.
  • the network interface of the interactive smart tablet is used to communicate with external terminals through a network connection.
  • the display screen of the interactive smart tablet may be a liquid crystal touch display screen
  • the input device of the interactive smart tablet may be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the interactive smart tablet housing. , Or an external keyboard, trackpad, or mouse.
  • FIG. 8 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 interactive smart tablet to which the solution of the present application is applied.
  • the interactive smart tablet may include more than shown in the figure. There are more or fewer parts, or some parts are combined, or there are different parts arrangements.
  • an interactive smart tablet which includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor executes the computer program, the following steps are implemented:
  • the processor executes the computer program to further implement the following steps:
  • the rotation path of the rotation element is calculated according to the position information of the rotation element and the rotation center; the adsorption area of the rotation element is determined according to the rotation path.
  • the processor executes the computer program to further implement the following steps:
  • the processor executes the computer program to further implement the following steps:
  • the processor executes the computer program to further implement the following steps:
  • the rotation angle of the candidate element and the rotation element is determined according to the rotation direction of the rotation element; the adsorption element is selected from the candidate elements according to the rotation angle.
  • the processor executes the computer program to further implement the following steps:
  • the rotation angle is compared with a set adsorption angle threshold; in response to the rotation angle being smaller than the adsorption angle threshold, an adsorption element is selected from the candidate elements.
  • the processor executes the computer program to further implement the following steps:
  • the distance between the rotation point and the rotation center is calculated according to the position information of the rotation point and the rotation center; the rotation circle of the rotation point is calculated according to the distance between the rotation point and the rotation center; and the adsorption area of the rotation point is determined according to the rotation circle.
  • the processor executes the computer program to further implement the following steps:
  • the position information of the two endpoints of the rotation line is obtained according to the position information of the rotation line.
  • the distances between the two endpoints and the rotation center are calculated according to the position information of the two endpoints and the position information of the rotation center.
  • the distance determines the rotation circle of the rotation line; the adsorption area of the rotation line is obtained according to the rotation circle.
  • the processor executes the computer program to further implement the following steps:
  • the processor executes the computer program to further implement the following steps:
  • an interactive smart tablet which includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor executes the computer program, the following steps are implemented:
  • the adsorbed element of the rotated element is selected; the rotated element is adsorbed to the adsorbed element by rotation.
  • the interactive smart tablet through the computer program running on the processor, can first select the adsorption element of the rotation element when rotating the rotation element, so that the rotation element is in the process of rotation
  • the rotating element can be quickly and rotationally adsorbed to the position of the adsorbed element to realize the rotational adsorption operation of the rotational element, and the operation efficiency of the rotational element is improved.
  • any reference to the memory, storage, database, or other media used in each embodiment provided in this application may include non-volatile and / or volatile memory.
  • Non-volatile memory may include Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Electrically Programmable ROM (Electrically Programmable Read-Only-Memory (EPROM), Electrically Readable Memory Erasable Programmable ROM (Erasrable, Programmable, Read-Only Memory, EEPROM) or flash memory.
  • ROM Read-Only Memory
  • PROM Programmable Read-Only Memory
  • EPROM Electrically Programmable Read-Only-Memory
  • EPROM Electrically Programmable Read-Only-Memory
  • EEPROM Electrically Readable Memory Erasable Programmable ROM
  • flash memory may include Random Access Memory (RAM) or external cache memory.
  • RAM Random Access Memory
  • RAM is available in a variety of forms, such as static RAM (Static Random Access Memory, SRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (Synchronous Random Access Memory, SDRAM), dual Data rate SDRAM (Double Data Rate Synchronous Dynamic Access Memory, DDRSDRAM), Enhanced SDRAM (Enhanced Synchronous Dynamic Dynamic Access Memory, ESDRAM), Synchronous Link (Sync Link) DRAM (Sync Link Dynamic Dynamic Random Access Memory, SLDRAM), memory Bus (Rambus) Direct RAM (Random Access Memory, RDRAM), Direct Memory Bus Dynamic RAM (Rambus Dynamic Access Memory, DRDRAM), and Memory Bus Dynamic RAM (Rambus Dynamic Access Memory, RDRAM).
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • SDRAM synchronous DRAM
  • SDRAM dual Data rate SDRAM (Double Data Rate Synchronous Dynamic Access Memory, DDRSDRAM)
  • Enhanced SDRAM Enhanced Synchronous Dynamic Dynamic Access
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
  • the computer program when executed by the processor further implements the following steps:
  • the rotation path of the rotation element is calculated according to the position information of the rotation element and the rotation center; the adsorption area of the rotation element is determined according to the rotation path.
  • the computer program when executed by the processor further implements the following steps:
  • the computer program when executed by the processor further implements the following steps:
  • the computer program when executed by the processor further implements the following steps:
  • the rotation angle of the candidate element and the rotation element is determined according to the rotation direction of the rotation element; the adsorption element is selected from the candidate elements according to the rotation angle.
  • the computer program when executed by the processor further implements the following steps:
  • the computer program when executed by the processor further implements the following steps:
  • the distance between the rotation point and the rotation center is calculated according to the position information of the rotation point and the rotation center; the rotation circle of the rotation point is calculated according to the distance between the rotation point and the rotation center; and the adsorption area of the rotation point is determined according to the rotation circle.
  • the computer program when executed by the processor further implements the following steps:
  • the position information of the two endpoints of the rotation line is obtained according to the position information of the rotation line.
  • the distances between the two endpoints and the rotation center are calculated according to the position information of the two endpoints and the position information of the rotation center.
  • the distance determines the rotation circle of the rotation line; the adsorption area of the rotation line is obtained according to the rotation circle.
  • the computer program when executed by the processor further implements the following steps:
  • the computer program when executed by the processor further implements the following steps:
  • a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the following steps are implemented:
  • the adsorbed element of the rotated element is selected; the rotated element is adsorbed to the adsorbed element by rotation.
  • the computer-readable storage medium according to any one of the foregoing embodiments.
  • an adsorption element of the rotating element can be selected first, so that the rotating element is being processed.
  • the rotating element can be quickly rotated and adsorbed to the position of the adsorbed element, so that the rotational adsorption operation of the rotated element is realized, and the operation efficiency of the rotated element is improved.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present text provides a method and apparatus for selecting an absorption element of a rotation element. The method comprises: selecting a rotation element and determining a rotation center of the rotation element; obtaining position information of the rotation element and rotation center; calculating an absorption region of the rotation element according to the position information of the rotation element and rotation center; and selecting an absorption element of the rotation element from scene elements according to the absorption region. The present text further provides a rotary absorption method and apparatus, an interactive intelligent tablet, and a computer readable storage medium.

Description

旋转元素的吸附元素选择方法和装置、旋转吸附方法和装置Rotary element adsorption method and device, rotary adsorption method and device
本申请要求在2018年08月20日提交中国专利局、申请号为201810948443.1的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority from a Chinese patent application filed with the Chinese Patent Office on August 20, 2018 with application number 201810948443.1, the entire contents of which are incorporated herein by reference.
技术领域Technical field
本申请涉及智能交互技术领域,例如涉及一种旋转元素的吸附元素选择方法、旋转元素的吸附元素选择装置、旋转吸附方法、旋转吸附装置、交互智能平板和计算机可读存储介质。The present application relates to the field of intelligent interaction technology, for example, to a method for selecting an adsorbed element of a rotating element, an apparatus for selecting an adsorbed element for a rotating element, an apparatus for rotating adsorption, an apparatus for rotating adsorption, an interactive smart tablet, and a computer-readable storage medium.
背景技术Background technique
随着信息处理技术的发展,智能交互技术被广泛地运用到多类电子产品当中,如交互智能平板是一种集成了投影机、电子白板、幕布、音响、电视机、视频会议终端的多功能一体化智能交互设备,通过智能交互技术对交互智能平板的显示平板上显示的内容进行操控实现人机交互。With the development of information processing technology, intelligent interactive technology is widely used in many types of electronic products. For example, interactive smart tablet is a multifunctional integrated projector, electronic whiteboard, curtain, audio, television, video conference terminal An integrated intelligent interaction device that controls the content displayed on the display panel of the interactive smart tablet through intelligent interaction technology to realize human-computer interaction.
在智能交互设备的使用过程中,通常会对显示的场景元素进行添加、复制、删除和移动等操作,然而在将元素进行旋转的过程中发现智能交互设备的元素操作方式需要将旋转元素进行多次位置调整后才能将该旋转元素旋转到目标位置,导致对场景元素的操作效率偏低,还会影响用户体验和人机交互的流畅程度。During the use of intelligent interactive devices, operations such as adding, copying, deleting, and moving the displayed scene elements are usually performed. However, during the rotation of the elements, it is found that the operation method of the elements of the intelligent interactive device requires multiple rotation elements. The rotation element can be rotated to the target position only after the secondary position adjustment, which results in low operating efficiency of the scene elements and also affects the smoothness of the user experience and human-computer interaction.
发明内容Summary of the Invention
本申请实施例提供一种旋转元素的吸附元素选择方法、旋转元素的吸附元素选择装置、旋转吸附方法、旋转吸附装置、交互智能平板和计算机可读存储介质,解决相关技术中操作效率偏低的问题。The embodiments of the present application provide a method for selecting a rotating element adsorption element, a rotating element adsorption element selecting device, a rotating adsorption method, a rotating adsorption device, an interactive smart tablet, and a computer-readable storage medium, which solves the problem of low operation efficiency in the related technology. problem.
在一实施例中,本申请实施例提供了一种旋转元素的吸附元素选择方法,包括:In an embodiment, an embodiment of the present application provides a method for selecting an adsorbed element of a rotating element, including:
选取旋转元素并确定所述旋转元素的旋转中心;Selecting a rotation element and determining a rotation center of the rotation element;
获取所述旋转元素和旋转中心的位置信息;Acquiring position information of the rotation element and the rotation center;
根据所述旋转元素和旋转中心的位置信息计算所述旋转元素的吸附区域;Calculating the adsorption area of the rotation element according to the position information of the rotation element and the rotation center;
根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素。The adsorption element of the rotating element is selected from the scene elements according to the adsorption region.
在一个实施例中,提供了一种旋转吸附方法,包括:In one embodiment, a spin adsorption method is provided, including:
根据如上任一项实施例所述的旋转元素的吸附元素选择方法选择旋转元素的吸附元素;Selecting the adsorption element of the rotation element according to the method for selecting the adsorption element of the rotation element according to any one of the above embodiments;
将所述旋转元素旋转吸附至所述吸附元素。The rotating element is rotationally adsorbed to the adsorbing element.
在一个实施例中,提供了一种旋转元素的吸附元素选择装置,包括:In one embodiment, an adsorption element selection device for rotating elements is provided, including:
旋转元素选取模块,设置为选取旋转元素并确定所述旋转元素的旋转中心;A rotation element selection module, configured to select a rotation element and determine a rotation center of the rotation element;
位置信息获取模块,设置为获取所述旋转元素和旋转中心的位置信息;A position information acquisition module, configured to acquire position information of the rotation element and the rotation center;
吸附区域计算模块,设置为根据所述旋转元素和旋转中心的位置信息计算所述旋转元素的吸附区域;An adsorption area calculation module configured to calculate an adsorption area of the rotation element according to the position information of the rotation element and the rotation center;
吸附元素选择模块,设置为根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素。The adsorption element selection module is configured to select an adsorption element of the rotating element from a scene element according to the adsorption region.
在一个实施例中,提供了一种旋转吸附装置,包括:In one embodiment, a rotary adsorption device is provided, including:
元素确定模块,设置为根据如上任一项实施例所述的旋转元素的吸附元素选择方法选择旋转元素的吸附元素;An element determination module, configured to select an adsorption element of a rotation element according to the method for selecting an adsorption element of a rotation element according to any one of the above embodiments;
元素吸附模块,设置为将所述旋转元素旋转吸附至所述吸附元素。The element adsorption module is configured to rotationally adsorb the rotating element to the adsorbed element.
在一个实施例中,提供了一种交互智能平板,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任一项实施例所述的方法。In one embodiment, an interactive smart tablet is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor implements any of the foregoing when the computer program is executed. The method described in the examples.
在一个实施例中,提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项实施例所述的方法。In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the foregoing embodiments is implemented.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例中旋转元素的吸附元素选择方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a method for selecting an adsorbed element of a rotating element in an embodiment of the present application; FIG.
图2为本申请实施例中旋转元素的吸附元素选择方法的流程示意图;2 is a schematic flowchart of a method for selecting an adsorbed element of a rotating element in an embodiment of the present application;
图3(a)为本申请实施例中旋转点与场景点的一种场景位置参考示意图;FIG. 3 (a) is a schematic diagram of a scene position reference of a rotation point and a scene point according to an embodiment of the present application; FIG.
图3(b)为本申请实施例中旋转点与场景点的另一种场景位置参考示意图;FIG. 3 (b) is another schematic view of scene position reference of a rotation point and a scene point in the embodiment of the present application; FIG.
图4(a)为本申请实施例中旋转点与场景线的一种场景位置参考示意图;4 (a) is a schematic diagram of a scene position reference of a rotation point and a scene line according to an embodiment of the present application;
图4(b)为本申请实施例中旋转点与场景线的另一种场景位置参考示意图;4 (b) is another schematic diagram of a scene position reference of a rotation point and a scene line in the embodiment of the present application;
图4(c)为本申请实施例中旋转点与场景线的又一种场景位置参考示意图;4 (c) is another schematic diagram of a scene position reference according to a rotation point and a scene line in an embodiment of the present application;
图5(a)为本申请实施例中旋转线与场景点的一种场景位置参考示意图;5 (a) is a schematic diagram of a scene position reference of a rotation line and a scene point according to an embodiment of the present application;
图5(b)为本申请实施例中旋转线与场景点的另一种场景位置参考示意图;5 (b) is another schematic diagram of a scene position reference of a rotation line and a scene point in the embodiment of the present application;
图5(c)为本申请实施例中旋转线与场景点的又一种场景位置参考示意图;FIG. 5 (c) is another schematic view of scene position reference of a rotation line and a scene point in the embodiment of the present application; FIG.
图6(a)为本申请实施例中旋转线与场景线的一种场景位置参考示意图;6 (a) is a schematic diagram of a scene position reference of a rotation line and a scene line according to an embodiment of the present application;
图6(b)为本申请实施例中旋转线与场景线的另一种场景位置参考示意图;6 (b) is another schematic diagram of a scene position reference of a rotation line and a scene line according to an embodiment of the present application;
图6(c)为本申请实施例中旋转线与场景线的又一种场景位置参考示意图;6 (c) is another schematic view of scene position reference of a rotation line and a scene line according to an embodiment of the present application;
图7为本申请实施例中旋转元素的吸附元素选择装置的结构示意图;7 is a schematic structural diagram of an adsorption element selection device for rotating elements in an embodiment of the present application;
图8为本申请实施例中交互智能平板的结构示意图。FIG. 8 is a schematic structural diagram of an interactive smart tablet according to an embodiment of the present application.
具体实施方式detailed description
以下结合附图及实施例,对本申请进行说明。此处描述的实施例仅仅用以解释本申请,并不用于限定本申请。The following describes the application with reference to the drawings and embodiments. The embodiments described here are only used to explain the application, and are not used to limit the application.
本申请提供的旋转元素的吸附元素选择方法,可以应用于如图1所示的应用场景中,图1为本申请实施例中旋转元素的吸附元素选择方法的应用场景示意图,该应用场景可以包括智能交互设备,可以是电脑、平板或交互智能平板等设备,其中,交互智能平板可以是通过触控技术对显示在交互智能平板的显示平板上的内容进行操控和实现人机交互操作的一体化设备,交互智能平板集成了投影机、电子白板、幕布、音响、电视机以及会议终端等一种或多种功能。在该智能交互设备的应用中,用户可以对安装在智能交互设备上的如教学课件制作软件等多种应用中涉及的场景元素进行编辑等操作。The method for selecting a rotating element adsorption element provided in this application can be applied to the application scenario shown in FIG. 1. FIG. 1 is a schematic diagram of an application scenario of the method for selecting a rotation element adsorption element in an embodiment of the present application. The application scenario may include The intelligent interactive device may be a computer, a tablet, or an interactive smart tablet. Among them, the interactive smart tablet may be a device that controls the content displayed on the display tablet of the interactive smart tablet and realizes the integration of human-computer interaction through touch technology. Equipment, interactive smart tablet integrates one or more functions such as projector, electronic whiteboard, curtain, sound, TV and conference terminal. In the application of the intelligent interactive device, the user can perform operations such as editing scene elements involved in various applications such as teaching courseware making software installed on the intelligent interactive device.
以交互智能平板100为例对应用场景进行说明,交互智能平板100可以通过交互智能平板的显示平板110将如教学课件制作软件等应用中的场景元素进行显示,使得用户能够在显示平板110上对显示的场景元素进行平移、添加、删除等操作,例如用户需要将旋转点R旋转至场景点P,交互智能平板100能够根据用户指定的旋转点R确定其旋转中心D对旋转点R进行旋转操作,然而,在旋转点R旋转至场景点P的过程当中,交互智能平板100相关技术中的元素操作方式需要用户将旋转点R在靠近场景点P的位置附近进行多次位置调整后才能将该旋转点R旋转到场景点P的位置,导致对多个场景元素的操作效率偏低。The interactive smart tablet 100 is used as an example to describe the application scenario. The interactive smart tablet 100 can display scene elements in applications such as teaching courseware production software through the interactive smart tablet display tablet 110, so that the user can The displayed scene elements perform operations such as panning, adding, and deleting. For example, the user needs to rotate the rotation point R to the scene point P. The interactive smart tablet 100 can determine its rotation center D according to the rotation point R specified by the user to rotate the rotation point R. However, in the process of rotating the rotation point R to the scene point P, the element operation method in the related technology of the interactive smart tablet 100 requires the user to adjust the rotation point R near the position of the scene point P multiple times before changing the position. The rotation point R is rotated to the position of the scene point P, which results in low operation efficiency on multiple scene elements.
在一实施例中,在对其他元素进行旋转时也同样存在操作效率偏低问题,将旋转点R旋转至场景点P只作为说明相关技术中的元素操作方式存在上述技术问题的其中一个示例,采用本申请提供的技术方案能够解决相关技术存在的效率偏低的问题,提高对场景元素的操作效率。In an embodiment, there is also a problem of low operation efficiency when rotating other elements. Rotating the rotation point R to the scene point P is only used as an example to explain that the element operation method in the related art has the above technical problems. The technical solution provided by this application can solve the problem of low efficiency in the related technology and improve the operation efficiency of scene elements.
在一个实施例中,提供了一种旋转元素的吸附元素选择方法,参考图2,图 2为本申请实施例中旋转元素的吸附元素选择方法的流程示意图,该方法可以应用于如图1所示的交互智能平板100中,该旋转元素的吸附元素选择方法可以包括S110至S140。In one embodiment, a method for selecting a rotating element adsorption element is provided. Referring to FIG. 2, FIG. 2 is a schematic flowchart of a method for selecting a rotating element adsorption element according to an embodiment of the present application. The method can be applied as shown in FIG. 1. In the illustrated interactive smart tablet 100, the method for selecting an adsorbed element of the rotating element may include S110 to S140.
S110,选取旋转元素并确定该旋转元素的旋转中心。S110. Select a rotation element and determine a rotation center of the rotation element.
其中,旋转元素是指在场景中用于进行旋转操作的元素,场景是指用于承载场景元素的区域,场景中可以对多种场景元素进行显示,例如点元素和线元素,其中线元素可以是线段元素,例如三角形的其中一边或者直尺边;旋转中心是指在对旋转元素进行旋转时的旋转中心,例如对旋转元素进行圆周旋转,则旋转中心对应为圆心。Among them, the rotation element refers to the element used for the rotation operation in the scene. The scene refers to the area used to carry the scene element. In the scene, a variety of scene elements can be displayed, such as point elements and line elements. Line elements can be Is a line segment element, such as one side of a triangle or a ruler side; the rotation center refers to the rotation center when the rotation element is rotated. For example, if the rotation element is rotated in a circle, the rotation center corresponds to the center of the circle.
本步骤中,用户可以在交互智能平板100显示的多个场景元素中选择旋转元素,也可以将新添加进场景的场景元素作为旋转元素,交互智能平板100可以将用户选择的元素选取为旋转元素,并确定其旋转中心。In this step, the user may select a rotation element among multiple scene elements displayed by the interactive smart tablet 100, or may use a scene element newly added to the scene as a rotation element. The interactive smart tablet 100 may select an element selected by the user as a rotation element. And determine its center of rotation.
S120,获取旋转元素和旋转中心的位置信息。S120. Obtain position information of the rotation element and the rotation center.
本步骤是交互智能平板100在选取旋转元素并确定旋转元素的旋转中心后,获取旋转元素及旋转元素的旋转中心的位置信息;其中,位置信息是指旋转元素和旋转中心在场景中的位置信息,例如旋转元素在该场景中的坐标、旋转中心在该场景中的坐标或旋转元素与旋转中心之间的相对位置关系等信息。This step is to obtain the position information of the rotation element and the rotation center of the rotation element after selecting the rotation element and determining the rotation center of the rotation element. The position information refers to the position information of the rotation element and the rotation center in the scene. For example, information such as the coordinates of the rotation element in the scene, the coordinates of the rotation center in the scene, or the relative position relationship between the rotation element and the rotation center.
S130,根据旋转元素和旋转中心的位置信息计算该旋转元素的吸附区域。S130: Calculate the adsorption area of the rotating element according to the position information of the rotating element and the rotation center.
其中,吸附是指在靠近目标位置时,就可以像磁铁一样被吸附过去。以图1中的旋转点为例,目标位置假设为场景点P所处位置,那么在旋转点R旋转到靠近场景点P时,用户希望该旋转点R会被场景点P吸附过去。吸附区域是指在场景中能够被特定的场景元素用于吸附的区域,旋转元素的吸附区域是指在场景中能够被旋转元素用于吸附的区域。Among them, adsorption means that when it is close to the target position, it can be attracted like a magnet. Taking the rotation point in FIG. 1 as an example, the target position is assumed to be the position of the scene point P. When the rotation point R is rotated close to the scene point P, the user hopes that the rotation point R will be absorbed by the scene point P. The adsorption region refers to a region that can be used for adsorption by a specific scene element in a scene, and the adsorption region of a rotation element refers to a region that can be used for adsorption by a rotation element in a scene.
本步骤中,交互智能平板100可以根据旋转元素及其旋转中心的位置信息计算出该旋转元素的吸附区域,该吸附区域用于为旋转元素选择吸附元素划定选择范围,例如该吸附区域可以包括该旋转元素在旋转过程中经过的区域,该区域可以根据旋转元素和旋转中心的相对距离计算得到。In this step, the interactive smart tablet 100 can calculate the adsorption area of the rotation element according to the position information of the rotation element and its rotation center, and the adsorption area is used to delimit the selection range for the rotation element selection. For example, the adsorption area may include The area that the rotating element passes through during the rotation. This area can be calculated based on the relative distance between the rotating element and the center of rotation.
S140,根据吸附区域从场景元素中选择旋转元素的吸附元素。S140. Select an adsorption element of the rotation element from the scene elements according to the adsorption region.
由于场景元素通常分布在场景的不同位置,本步骤是交互智能平板100根据S130得到的吸附区域从场景元素中选择特定的场景元素作为旋转元素的吸附元素。Since the scene elements are usually distributed in different positions of the scene, in this step, the interactive smart tablet 100 selects a specific scene element from the scene elements as the adsorption element of the rotating element according to the adsorption area obtained in S130.
一般来说,交互智能平板100可以根据场景元素与吸附区域的交叠程度对吸附元素进行选择,例如将位于吸附区域中的场景元素作为该旋转元素的吸附元素。其中,吸附元素是指场景元素中可以被所述旋转元素进行吸附的元素,包括点或线的元素,一个场景元素可能包含有多个点和线,吸附元素可以对元素当中的点或线进行吸附,以二维平面构成的场景为例,这些场景元素为在二 维平面上不进行移动的场景元素,可以用于旋转元素进行吸附的元素,如二维平面中的三角形的一条边,而旋转元素可以是直尺的刻度线,三角形的一条边可以用于直尺的刻度线进行吸附。In general, the interactive smart tablet 100 can select an adsorption element according to the overlap degree of the scene element and the adsorption region, for example, using the scene element located in the adsorption region as the adsorption element of the rotating element. Among them, the adsorbed element refers to the elements in the scene element that can be adsorbed by the rotating element, including elements of points or lines. A scene element may include multiple points and lines, and the adsorbed elements can perform the points or lines among the elements. Adsorption, taking a scene composed of a two-dimensional plane as an example, these scene elements are scene elements that do not move on the two-dimensional plane, and can be used to rotate elements for adsorption, such as an edge of a triangle in a two-dimensional plane, and The rotation element can be a ruler's tick mark, and one side of the triangle can be used for the ruler's tick mark for adsorption.
上述实施例的旋转元素的吸附元素选择方法,选取旋转元素并且确定其旋转中心,获取该旋转元素和旋转中心的位置信息,根据该位置信息计算旋转元素的吸附区域,基于该吸附区域从场景元素中选择吸附元素,使得在对旋转元素进行旋转操作时能够选择旋转元素的吸附元素,可以用于在将该旋转元素进行旋转时吸附,使得该旋转元素进行旋转的过程中可以快速旋转至吸附元素的位置,克服了相关技术需要对旋转元素进行多次位置调整的问题,提高了旋转元素的操作效率。The adsorption element selection method for a rotating element in the above embodiment selects a rotating element and determines its rotation center, obtains position information of the rotation element and the rotation center, calculates an adsorption region of the rotation element based on the position information, and based on the adsorption region, selects a scene element from the scene element. Selecting the adsorption element in the rotation element enables the selection of the adsorption element of the rotation element when the rotation element is rotated, and can be used to adsorb the rotation element when it is rotated, so that the rotation element can be quickly rotated to the adsorption element during the rotation process. The position of the rotating element overcomes the problem that the related technology needs to adjust the position of the rotating element multiple times, and improves the operating efficiency of the rotating element.
在一个实施例中,S130中的根据旋转元素和旋转中心的位置信息确定计算旋转元素的吸附区域可以包括:In one embodiment, determining the calculation of the adsorption area of the rotation element according to the position information of the rotation element and the rotation center in S130 may include:
根据旋转元素和旋转中心的位置信息计算旋转元素的旋转路径;根据旋转路径确定旋转元素的吸附区域。The rotation path of the rotation element is calculated according to the position information of the rotation element and the rotation center; the adsorption area of the rotation element is determined according to the rotation path.
本实施例中,旋转路径是指旋转过程中形成的运动轨迹,旋转元素的旋转路径是指旋转元素在场景中旋转时经过的运动轨迹,旋转路径可以经过交互智能平板100计算后通过显示平板110进行显示,使得旋转路径更加直观、可视化程度更高。In this embodiment, the rotation path refers to the motion trajectory formed during the rotation. The rotation path of the rotation element refers to the motion trajectory of the rotation element when it rotates in the scene. The rotation path can be calculated by the interactive smart tablet 100 and then passed through the display tablet 110 The display makes the rotation path more intuitive and more visualized.
交互智能平板100可以实时获取旋转元素和旋转中心的位置信息如相对距离,并根据该位置信息计算旋转元素的旋转路径,再根据旋转路径确定该旋转元素的吸附区域。其中,可以将该旋转路径设置为吸附区域,并将该吸附区域通过显示平板110进行显示,使得用户可以直观地看到吸附区域所在位置,有利于对吸附元素进行选择。The interactive smart tablet 100 can obtain the position information of the rotation element and the rotation center such as the relative distance in real time, calculate the rotation path of the rotation element according to the position information, and then determine the adsorption area of the rotation element according to the rotation path. Wherein, the rotation path can be set as an adsorption region, and the adsorption region is displayed on the display panel 110, so that the user can intuitively see the location of the adsorption region, which is beneficial for selecting an adsorption element.
在一个实施例中,上述实施例中的根据旋转路径确定旋转元素的吸附区域可以包括:In one embodiment, determining the adsorption region of the rotation element according to the rotation path in the above embodiment may include:
获取设定的路径误差值;根据路径误差值和旋转路径设置旋转元素的吸附区域。Get the set path error value; set the adsorption area of the rotating element according to the path error value and the rotation path.
本实施例中,路径误差值是指旋转路径允许的误差值,设置路径误差值是考虑到在对旋转元素进行旋转时,旋转路径与用户期望的路径容易存在一定偏差。In this embodiment, the path error value refers to an allowable error value of the rotation path, and the path error value is set to take into consideration that when the rotation element is rotated, the rotation path is likely to have a certain deviation from the path expected by the user.
交互智能平板100可以根据路径误差值和旋转路径设置旋转元素的吸附区域,例如根据路径误差值将标识旋转路径的线条进行加宽,有利于在对旋转元素进行旋转过程中,通过路径误差值提高旋转路径的容错率,更准确地将旋转元素吸附到用户期望吸附到的场景元素,其中,路径误差值可以根据交互智能设备100的屏幕尺寸进行设置,计算方式可以是屏幕尺寸除以375,如果这个值设置得过大,则容易使旋转元素在旋转过程中吸附到不期望吸附到的场景元素。The interactive smart tablet 100 can set the adsorption area of the rotation element according to the path error value and the rotation path. For example, the line identifying the rotation path is widened according to the path error value, which is beneficial to improve the path error value during the rotation of the rotation element. The error tolerance of the rotation path will more accurately attract the rotation element to the scene element that the user wants to attract. The path error value can be set according to the screen size of the interactive smart device 100. The calculation method can be the screen size divided by 375. If this value is set too large, it is easy for the rotating elements to adsorb undesired scene elements during the rotation process.
在一个实施例中,S140中的根据吸附区域从场景元素中选择旋转元素的吸附元素可以包括:In one embodiment, the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
将吸附区域中的场景元素设为备选元素;确定旋转元素的旋转方向;根据旋转方向从备选元素中选取吸附元素。Set the scene element in the adsorption area as a candidate element; determine the rotation direction of the rotation element; and select the adsorption element from the candidate elements according to the rotation direction.
其中,备选元素是指位于吸附区域中的场景元素,这里所指的位于吸附区域中的场景元素不仅限于完全落入吸附区域中的场景元素,也可以是与吸附区域具有一定交叠区域的场景元素;旋转方向是指旋转元素在场景中进行旋转操作时的运动,以圆周旋转为例,旋转方向包括顺时针和逆时针方向。Among them, the candidate element refers to the scene element located in the adsorption area, and the scene element located in the adsorption area here is not limited to the scene element that completely falls into the adsorption area, but may also have a certain overlapping area with the adsorption area. Scene element; rotation direction refers to the movement of the rotation element when performing a rotation operation in the scene, taking the circular rotation as an example. The rotation direction includes clockwise and counterclockwise directions.
交互智能平板100可以获取位于吸附区域中的场景元素,并设为备选元素,获取旋转元素在旋转过程中的运动方向作为该旋转元素的旋转方向,根据旋转方向从备选元素中选择吸附元素。The interactive smart tablet 100 can obtain scene elements located in the adsorption area and set them as candidate elements. The movement direction of the rotating element during the rotation process is used as the rotation direction of the rotation element, and the adsorption element is selected from the candidate elements according to the rotation direction. .
本实施例是考虑到用户在将旋转元素进行旋转操作时,会将该旋转元素按照某个方向进行旋转,例如将旋转元素按照逆时针的方向进行旋转,则可以从备选元素中选取与该逆时针方向吸附匹配的元素作为吸附元素,有利于旋转元素快速地旋转吸附到该吸附元素的位置,然而如果选取顺时针方向上的备选元素则会影响用户对旋转元素的旋转吸附操作,容易使得该旋转元素吸附到反向的场景元素中,这样用户需要对旋转元素进行重新吸附,既降低了操作效率,还降低用户体验。This embodiment considers that when the user rotates a rotating element, the rotating element will be rotated in a certain direction. For example, if the rotating element is rotated in a counterclockwise direction, you can select from the alternative elements. Adopting a matched element in the counterclockwise direction as an adsorbed element is beneficial to the rotating element to rotate and adsorb to the position of the adsorbed element quickly. However, if a candidate element in the clockwise direction is selected, it will affect the user's rotating adsorption operation on the rotating element, which is easy. The rotating element is adsorbed into the reverse scene element, so that the user needs to re-adsorb the rotating element, which not only reduces the operation efficiency but also reduces the user experience.
在一个实施例中,上述实施例中的根据旋转方向从备选元素中选取吸附元素可以包括:In one embodiment, selecting the adsorption element from the candidate elements according to the rotation direction in the above embodiment may include:
根据旋转元素的旋转方向确定备选元素与旋转元素的旋转角度;根据旋转角度在备选元素中选取吸附元素。The rotation angle of the candidate element and the rotation element is determined according to the rotation direction of the rotation element; the adsorption element is selected from the candidate elements according to the rotation angle.
其中,备选元素与旋转元素的旋转角度是指备选元素、旋转中心以及旋转元素形成的夹角。The rotation angle between the candidate element and the rotation element refers to the angle formed by the candidate element, the rotation center, and the rotation element.
交互智能平板100可以根据旋转元素的旋转方向可以依次确定多个备选元素与旋转元素之间所形成的旋转角度,并根据该旋转角度在多个备选元素中选择吸附元素。考虑到多个备选元素与旋转元素实际上会形成多个夹角,某些特定夹角对应的备选元素可能不适宜作为吸附元素,本实施例的方案能够提高吸附元素的选取效率和准确性。The interactive smart tablet 100 may sequentially determine a rotation angle formed between a plurality of candidate elements and the rotation element according to a rotation direction of the rotation element, and select an adsorption element among the plurality of candidate elements according to the rotation angle. Considering that multiple candidate elements and rotating elements actually form multiple included angles, the candidate elements corresponding to certain specific included angles may not be suitable as adsorption elements. The solution of this embodiment can improve the efficiency and accuracy of the selection of the adsorbed elements. Sex.
另外,交互智能平板100还可以将这些备选元素及备选元素对应的夹角通过显示平板110进行显示,提供给用户进行选择,选择需要作为吸附元素的备选元素。In addition, the interactive smart tablet 100 can also display these candidate elements and the corresponding angles of the candidate elements through the display tablet 110 to provide the user with a choice, and select the candidate element that needs to be used as an adsorbed element.
在一个实施例中,上述实施例中的根据旋转角度在备选元素中选取吸附元素可以包括:In one embodiment, selecting the adsorption element from the candidate elements according to the rotation angle in the above embodiment may include:
将旋转角度与设定的吸附角度阈值进行比较;响应于旋转角度小于吸附角度阈值,从备选元素中选择吸附元素。The rotation angle is compared with a set adsorption angle threshold; in response to the rotation angle being smaller than the adsorption angle threshold, an adsorption element is selected from the candidate elements.
本实施例中,吸附角度阈值是指用于对所述旋转角度进行筛选的角度阈值。In this embodiment, the suction angle threshold refers to an angle threshold used for filtering the rotation angle.
交互智能平板100可以获取用户预先设定的吸附角度阈值,将每个备选元素与旋转元素的旋转角度与吸附角度阈值进行比较,若旋转角度小于吸附角度阈值,则从该旋转角度对应的备选元素中选择吸附元素。The interactive smart tablet 100 can obtain the suction angle threshold set by the user in advance, and compare the rotation angle of each candidate element and the rotation element with the suction angle threshold. If the rotation angle is less than the suction angle threshold, the backup corresponding to the rotation angle is prepared. Select the adsorbed element from the selected elements.
考虑到在多个备选元素中,有些备选元素与旋转元素形成的夹角过大,说明这些备选元素与旋转元素在旋转路径上距离较远,不适宜作为吸附元素,所以本实施例的技术方案从旋转角度小于吸附角度阈值的备选元素中选择吸附元素,有利于提高吸附元素的选择效率和准确性。Considering that among multiple candidate elements, the angle formed between some candidate elements and the rotating element is too large, which indicates that these candidate elements are far away from the rotating element on the rotation path and are not suitable as adsorption elements, so this embodiment The technical solution of the present invention is to select an adsorption element from candidate elements whose rotation angle is less than the threshold of the adsorption angle, which is beneficial to improving the efficiency and accuracy of the selection of the adsorption element.
此外,交互智能平板100还可以通过显示平板110将选择出来的吸附元素及其对应的旋转角度以列表的形式进行显示,使得选择的吸附元素更直观地展示,提高用户体验。In addition, the interactive smart tablet 100 may also display the selected adsorbed element and its corresponding rotation angle in a list form through the display tablet 110, so that the selected adsorbed element is displayed more intuitively and the user experience is improved.
在一个实施例中,所述旋转元素为旋转点;S130中的根据旋转元素和旋转中心的位置信息计算旋转元素的吸附区域可以包括:In one embodiment, the rotation element is a rotation point; calculating the adsorption region of the rotation element according to the position information of the rotation element and the rotation center in S130 may include:
根据旋转点和旋转中心的位置信息计算旋转点与旋转中心的距离;根据旋转点和旋转中心的距离计算旋转点的旋转圆周;根据旋转圆周确定旋转点的吸附区域。The distance between the rotation point and the rotation center is calculated according to the position information of the rotation point and the rotation center; the rotation circle of the rotation point is calculated according to the distance between the rotation point and the rotation center; and the adsorption area of the rotation point is determined according to the rotation circle.
本实施例是在旋转元素为旋转点的情况下计算旋转点的吸附区域。参考图3(a),图3(a)为本申请实施例中旋转点与场景点的一种场景位置参考示意图,该场景包括旋转点R、旋转中心D以及多个场景点元素P,其中,场景点元素P为场景元素中的点元素;旋转圆周C是指旋转点R在旋转时形成的圆周。This embodiment calculates the adsorption area of the rotation point when the rotation element is the rotation point. Referring to FIG. 3 (a), FIG. 3 (a) is a schematic diagram of a scene position reference of a rotation point and a scene point in the embodiment of the present application. The scene includes a rotation point R, a rotation center D, and a plurality of scene point elements P, where The scene point element P is a point element in the scene element; the rotation circle C refers to a circle formed by the rotation point R when rotated.
交互智能平板100可以根据旋转点R和旋转中心D的坐标对旋转点R与旋转中心D之间的距离进行计算,例如旋转点R的坐标为(x 1,y 1),旋转中心D的坐标为(x 2,y 2),则旋转点R与旋转中心D之间的距离d可以表示为
Figure PCTCN2019099799-appb-000001
根据距离d可以计算旋转点的旋转圆周C,然后可以将该旋转圆周C设为旋转点R的吸附区域,另外,在实际计算中考虑到计算距离时需要进行多次开方运算,而计算距离d的目的在于确定两个点之间的相对距离,所以为了减少开放运算的次数,提高运算效率,可以使用距离d的平方对应旋转点R与旋转中心D之间的距离。
The interactive smart tablet 100 can calculate the distance between the rotation point R and the rotation center D according to the coordinates of the rotation point R and the rotation center D. For example, the coordinates of the rotation point R are (x 1 , y 1 ), and the coordinates of the rotation center D Is (x 2 , y 2 ), the distance d between the rotation point R and the rotation center D can be expressed as
Figure PCTCN2019099799-appb-000001
According to the distance d, the rotation circle C of the rotation point can be calculated, and then the rotation circle C can be set as the adsorption area of the rotation point R. In addition, in the actual calculation, it is necessary to perform multiple square root calculations to calculate the distance. The purpose of d is to determine the relative distance between two points, so in order to reduce the number of open operations and improve the operation efficiency, the square of the distance d can be used to correspond to the distance between the rotation point R and the rotation center D.
在一个实施例中,S140中的根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素可以包括:In one embodiment, the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
确定场景元素中的场景点元素,获取场景点元素的位置信息;根据场景点元素和旋转中心的位置信息计算场景点元素与旋转中心的距离;根据场景点元素与旋转中心的距离确定吸附区域中的场景点元素;从吸附区域中的场景点元素中选择旋转点的吸附元素。Determine the scene point element in the scene element and obtain the position information of the scene point element; calculate the distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center; determine the adsorption area according to the distance between the scene point element and the rotation center Scene point element; select the rotation point adsorption element from the scene point elements in the adsorption area.
本实施例是在确定旋转点的旋转圆周后,在场景元素中确定属于点元素的 场景点元素,在该场景点元素中选择吸附元素;其中,场景点元素的位置信息包括场景点元素的位置坐标。In this embodiment, after determining a rotation circle of a rotation point, a scene point element belonging to a point element is determined in a scene element, and an adsorption element is selected in the scene point element; wherein the position information of the scene point element includes the position of the scene point element coordinate.
根据每个场景点元素以及旋转中心的位置坐标,通过如下距离公式可以分别计算每个场景点元素与旋转中心的距离d:According to the position coordinates of each scene point element and the rotation center, the distance d of each scene point element from the rotation center can be calculated separately by the following distance formula:
Figure PCTCN2019099799-appb-000002
Figure PCTCN2019099799-appb-000002
其中,场景点元素的坐标可以表示为(x 1,y 1),旋转中心的坐标可以表示为(x 2,y 2),考虑到场景中可能存在大量的场景点元素,可以将距离的平方对应为每个场景点元素与旋转中心的距离d,这样能够减少很多次开方操作,提高运算效率。 The coordinates of the scene point elements can be expressed as (x 1 , y 1 ), and the coordinates of the rotation center can be expressed as (x 2 , y 2 ). Considering that there may be a large number of scene point elements in the scene, the distance can be squared. Corresponds to the distance d between each scene point element and the center of rotation, which can reduce many square root operations and improve computing efficiency.
根据场景点元素与旋转中心的距离d可以确定该场景点元素是否位于吸附区域中,假设场景点元素与旋转中心的距离与旋转圆周C的半径之间的偏差值很大,那么认为该场景点元素不是位于吸附区域中的场景元素,可以将其进行排除,以此方式能够排除所有与旋转圆周C的半径之间的偏差值很大元素,剩余的场景点元素即为吸附区域中的场景元素,如图3(b)所示,图3(b)为本申请实施例中旋转点与场景点的另一种场景位置参考示意图,吸附区域中的场景元素对应于图3(b)中的场景点元素P 1、P 2、P 3、P 4和P 5According to the distance d between the scene point element and the rotation center, it can be determined whether the scene point element is located in the adsorption area. Assuming that the distance between the scene point element and the rotation center and the radius of the rotation circle C is large, then the scene point is considered The element is not a scene element located in the adsorption area, which can be excluded. In this way, all elements with a large deviation from the radius of the rotation circle C can be excluded. The remaining scene point elements are the scene elements in the adsorption area. As shown in FIG. 3 (b), FIG. 3 (b) is another schematic view of the scene position of the rotation point and scene point in the embodiment of the present application. scene point elements P 1, P 2, P 3 , P 4 and P 5.
在一实施例中,可以遍历场景点元素P 1、P 2、P 3、P 4和P 5,取第n个元素P n,连接P n和旋转中心D,以及旋转点R和旋转中心D,作两个向量
Figure PCTCN2019099799-appb-000003
Figure PCTCN2019099799-appb-000004
求向量
Figure PCTCN2019099799-appb-000005
Figure PCTCN2019099799-appb-000006
的夹角P α,如果满足夹角P α小于设定的吸附角度阈值α,那么可以将P n放到备选元素集合P d中。
In one embodiment, it can traverse the scene point elements P 1, P 2, P 3 , P 4 and P 5, take n-th element P n, connected to P n and the rotation center D, and the rotation point R and center of rotation D , Make two vectors
Figure PCTCN2019099799-appb-000003
with
Figure PCTCN2019099799-appb-000004
Find the vector
Figure PCTCN2019099799-appb-000005
with
Figure PCTCN2019099799-appb-000006
P α angle, if the angle P α satisfies the threshold value is smaller than the angle [alpha] is set adsorbed, then can be placed in alternative elements P n P d in the collection.
可选的,当场景点元素的旋转方向为逆时针方向,考虑到需要选取吸附方向和旋转方向相同的场景点元素,如图3(b)所示,则可以将除了P 1以外的所有备选元素集合P d中的场景点元素进行排除,因为这些场景点元素要么与旋转点形成的旋转角度太大,或者虽然角度较小但是吸附方向与旋转点的旋转方向相反,将这些场景点元素进行排除有利于提高吸附元素的选择效率。 Optionally, when the rotation direction of the scene point element is counterclockwise, considering the need to select scene point elements with the same adsorption direction and rotation direction, as shown in FIG. 3 (b), all alternatives except P 1 can be selected. The scene point elements in the element set P d are excluded, because these scene point elements are either too large in rotation angle with the rotation point, or although the angle is small, but the adsorption direction is opposite to the rotation direction of the rotation point, these scene point elements are processed Elimination is beneficial to improve the selection efficiency of adsorbed elements.
在一实施例中,可以采用如下计算方式选取备选元素中满足旋转角度的场景点元素:In an embodiment, the following calculation methods can be used to select scene point elements that satisfy the rotation angle among the candidate elements:
如果两个向量
Figure PCTCN2019099799-appb-000007
Figure PCTCN2019099799-appb-000008
叉乘运算得到的值大于0,那么从向量
Figure PCTCN2019099799-appb-000009
Figure PCTCN2019099799-appb-000010
是逆时针,否则是顺时针,通过遍历备选元素集合P d,第n个元素为P dn,去掉所有不满足叉乘运算的值大于0且旋转角度大于吸附角度阈值α的元素,最后剩下的备选元素可以作为吸附元素,可以将该吸附元素对应的旋转角度进行显示输出。
If two vectors
Figure PCTCN2019099799-appb-000007
with
Figure PCTCN2019099799-appb-000008
The value obtained by the cross product operation is greater than 0, then from the vector
Figure PCTCN2019099799-appb-000009
To
Figure PCTCN2019099799-appb-000010
It is counterclockwise, otherwise it is clockwise. By traversing the candidate element set P d , the nth element is P dn , remove all elements that do not meet the value of the cross product operation greater than 0 and the rotation angle is greater than the adsorption angle threshold α. The candidate element below can be used as an adsorption element, and the rotation angle corresponding to the adsorption element can be displayed and output.
在一个实施例中,S140中的根据吸附区域从场景元素中选择旋转元素的吸 附元素可以包括:In one embodiment, the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
确定场景元素中的场景线元素;获取场景线元素的位置信息;根据场景线元素的位置信息获取场景线元素与吸附区域的相交元素;从相交元素中选择旋转点的吸附元素。Determine the scene line element in the scene element; obtain the position information of the scene line element; obtain the intersecting element of the scene line element and the adsorption area according to the position information of the scene line element; and select the adsorption element of the rotation point from the intersecting element.
其中,场景线元素为场景中属于线段的元素,场景线元素的位置信息可以包括场景线元素中每个点的位置坐标,相交元素是指在场景线元素中与吸附区域交叠的元素,若场景线元素位于吸附区域中,则该场景线元素即为相交元素,若场景线元素中部分元素位于吸附区域中,则该部分元素为相交元素。在该获取的相交元素中选择旋转点的吸附元素。The scene line element is an element belonging to a line segment in the scene. The position information of the scene line element may include the position coordinates of each point in the scene line element. The intersecting element refers to the element that overlaps the adsorption area in the scene line element. If the scene line element is located in the adsorption area, the scene line element is an intersecting element. If a part of the scene line element is located in the adsorption area, the part element is an intersecting element. Among the acquired intersecting elements, the adsorption element of the rotation point is selected.
本实施例是在确定旋转点的旋转圆周后,在场景元素中确定属于线元素的场景线元素,根据该场景线元素与吸附区域即旋转圆周的相交元素选择旋转点的吸附元素。In this embodiment, after the rotation circle of the rotation point is determined, the scene line element belonging to the line element is determined in the scene element, and the adsorption element of the rotation point is selected according to the intersection of the scene line element and the adsorption area, that is, the rotation circle.
参考图4(a),图4(a)为本申请实施例中旋转点与场景线的一种场景位置参考示意图,该场景包括旋转点R、旋转中心D以及场景线元素P 1、P 2和P 3,如图4(b)所示,图4(b)为本申请实施例中旋转点与场景线的另一种场景位置参考示意图,在确定场景点R的旋转圆周C后,可以确定场景元素中的场景线元素P 1、P 2和P 3,根据每个场景线元素的位置信息如每个场景线元素上每个点的位置坐标,可以获取每个场景线元素与吸附区域的相交元素,如每个场景线元素与旋转圆周C的交点,在多个交点中选择吸附元素。 Referring to FIG. 4 (a), FIG. 4 (a) is a schematic diagram of a scene position reference diagram of a rotation point and a scene line according to an embodiment of the present application. The scene includes a rotation point R, a rotation center D, and scene line elements P 1 and P 2 And P 3 , as shown in FIG. 4 (b), FIG. 4 (b) is another schematic diagram of scene position reference of the rotation point and the scene line in the embodiment of the present application. After determining the rotation circle C of the scene point R, Determine the scene line elements P 1 , P 2, and P 3 in the scene elements. According to the position information of each scene line element, such as the position coordinates of each point on each scene line element, each scene line element and the adsorption area can be obtained. Intersecting elements, such as the intersection of each scene line element and the rotation circle C, select the adsorption element from multiple intersections.
参考图4(b),如果场景线元素P n满足被旋转点R吸附,那么场景线元素P n必定和旋转点R的旋转圆周C至少存在一个交点,如果场景线元素P n和旋转圆周C不存在交点,可以认为旋转点R不能吸附到场景线元素P n。可以遍历场景线元素P 1、P 2和P 3,第n个元素为P n,并通过通用的算法求元素P n作为线段和旋转圆周C的相交元素A 1、A 2和A 3,记相交元素的集合为A。 Referring to FIG. 4 (b), if the scene line element P n satisfies the attraction of the rotation point R, then the scene line element P n must have at least one intersection with the rotation circle C of the rotation point R. If the scene line element P n and the rotation circle C exist, There is no intersection point, and it can be considered that the rotation point R cannot be attracted to the scene line element P n . You can traverse the scene line elements P 1 , P 2 and P 3 , the nth element is P n , and find the element P n as the intersection element A 1 , A 2 and A 3 of the line segment and the rotation circle C by a general algorithm. The set of intersecting elements is A.
若场景线元素P n和旋转点R的旋转圆周C存在交点,可以判断相交元素与旋转点R的旋转角度,如果旋转角度太大或旋转方向不匹配,那么也可以认为旋转点R不能吸附到场景线元素P nIf there is an intersection between the scene line element P n and the rotation circle C of the rotation point R, the rotation angle of the intersecting element and the rotation point R can be judged. If the rotation angle is too large or the rotation direction does not match, the rotation point R cannot be considered Scene line element P n .
参考图4(c),图4(c)为本申请实施例中旋转点与场景线的又一种场景位置参考示意图,可以遍历相交元素的集合A,集合A的第n个元素为A n,取向量
Figure PCTCN2019099799-appb-000011
和向量
Figure PCTCN2019099799-appb-000012
的夹角P α,如果夹角P α小于吸附角度阈值α,而且夹角P α方向和旋转方向相同,则可以把场景线元素P n放到备选元素集合P d中,并且记录该场景线元素的交点A n
Referring to FIG. 4 (c), FIG. 4 (c) is another schematic view of scene position reference of the rotation point and the scene line in the embodiment of the present application. It can traverse the set A of intersecting elements, and the nth element of the set A is A n , Take the vector
Figure PCTCN2019099799-appb-000011
And vector
Figure PCTCN2019099799-appb-000012
P α angle, if the angle P α is less than the threshold value [alpha] suction angle, and the angle P α and rotational directions are the same, the scene can be placed in line element P n P d in the set of alternative elements, and records the scene The intersection A n of line elements.
可选的,如图4(c)所示,考虑到需要选取吸附方向和旋转方向相同的场景点元素,当场景点元素的旋转方向为逆时针方向,则可以将除了P 1以外的所有备选元素集合P d中的场景线元素进行排除,因为这些场景线元素与旋转圆周C的交点要么与旋转点R形成的旋转角度太大,或者虽然角度较小但是吸附方 向与旋转点的旋转方向相反,将这些场景线元素进行排除有利于提高吸附元素的选择效率。 Optionally, as shown in FIG. 4 (c), considering the need to select scene point elements with the same suction direction and rotation direction, when the rotation direction of the scene point element is counterclockwise, all alternatives except P 1 can be selected. The scene line elements in the element set P d are excluded because the intersection point of these scene line elements with the rotation circle C is either too large from the rotation angle formed by the rotation point R, or although the angle is small, the adsorption direction is opposite to the rotation direction of the rotation point Excluding these scene line elements will help improve the selection efficiency of the adsorbed elements.
在一实施例中,可以采用如下计算方式选取备选元素中满足旋转角度的场景线元素:In an embodiment, the following calculation methods can be used to select scene line elements that satisfy the rotation angle among the candidate elements:
如果两个向量
Figure PCTCN2019099799-appb-000013
Figure PCTCN2019099799-appb-000014
叉乘运算得到的值大于0,那么从向量
Figure PCTCN2019099799-appb-000015
到向量
Figure PCTCN2019099799-appb-000016
是逆时针,否则是顺时针,通过遍历相交元素的集合A,第n个元素对应的交点元素为A n,去掉所有不满足叉乘运算的值大于0且旋转角度大于吸附角度阈值α的交点元素,最后剩下的交点元素可以作为吸附元素,可以将该吸附元素对应的旋转角度进行显示输出。
If two vectors
Figure PCTCN2019099799-appb-000013
with
Figure PCTCN2019099799-appb-000014
The value obtained by the cross product operation is greater than 0, then from the vector
Figure PCTCN2019099799-appb-000015
To vector
Figure PCTCN2019099799-appb-000016
It is counterclockwise, otherwise it is clockwise. By traversing the set of intersecting elements A, the intersection element corresponding to the nth element is A n , and remove all intersections that do not meet the value of the cross product operation greater than 0 and the rotation angle is greater than the adsorption angle threshold α. Element, the last remaining intersection element can be used as an adsorption element, and the rotation angle corresponding to the adsorption element can be displayed and output.
在一个实施例中,所述旋转元素为旋转线;S130中的根据旋转元素和旋转中心的位置信息计算旋转元素的吸附区域可以包括:In one embodiment, the rotation element is a rotation line; calculating the adsorption area of the rotation element according to the position information of the rotation element and the rotation center in S130 may include:
根据旋转线的位置信息获取旋转线的两个端点的位置信息;根据两个端点的位置信息和旋转中心的位置信息计算两个端点分别与旋转中心的距离;根据两个端点分别与旋转中心的距离确定旋转线的旋转圆环;根据旋转圆环获取旋转线的吸附区域。The position information of the two endpoints of the rotation line is obtained according to the position information of the rotation line. The distances between the two endpoints and the rotation center are calculated according to the position information of the two endpoints and the position information of the rotation center. The distance determines the rotation circle of the rotation line; the adsorption area of the rotation line is obtained according to the rotation circle.
参考图5(a),图5(a)为本申请实施例中旋转线与场景点的一种场景位置参考示意图,该场景包括旋转线L、旋转中心D以及多个场景点元素P,如图5(b)所示,图5(b)为本申请实施例中旋转线与场景点的另一种场景位置参考示意图,本实施例是在旋转元素为旋转线且该旋转线L所在直线穿过旋转中心D的情况下的吸附区域。Referring to FIG. 5 (a), FIG. 5 (a) is a schematic diagram of a scene position reference of a rotation line and a scene point in the embodiment of the present application. The scene includes a rotation line L, a rotation center D, and a plurality of scene point elements P, such as As shown in FIG. 5 (b), FIG. 5 (b) is another schematic view of a scene position reference of a rotation line and a scene point in the embodiment of the present application. In this embodiment, the rotation element is a rotation line and the rotation line L is on a straight line. The suction area in the case of passing through the rotation center D.
本实施例中,旋转线是指场景中用于旋转的旋转线段,旋转线的位置信息包括该旋转线上每个点的在场景中的位置坐标,旋转圆环是指旋转线的两个端点分别与旋转中心形成的旋转圆周,如图5(c)所示,图5(c)为本申请实施例中旋转线与场景点的又一种场景位置参考示意图,该图5(c)所示旋转线L的两个端点L a和L b分别与旋转中心D形成的旋转圆周C a和C b,旋转圆周C a和C b可以根据端点L a和L b与旋转中心D之间的距离计算,可以将旋转圆周C a和C b之间形成的区域作为旋转线的所述旋转圆环,将该旋转圆环作为旋转线的吸附区域。 In this embodiment, the rotation line refers to a rotation line segment for rotation in the scene. The position information of the rotation line includes the position coordinates of each point on the rotation line in the scene. The rotation circle refers to the two endpoints of the rotation line. The rotation circles respectively formed with the rotation center are shown in FIG. 5 (c). FIG. 5 (c) is another schematic diagram of scene position reference of the rotation line and scene point in the embodiment of the present application. The rotation circles C a and C b formed by the two end points L a and L b of the rotation line L and the rotation center D are shown. The rotation circumferences C a and C b can be determined by the distance between the end points L a and L b and the rotation center D. For distance calculation, the area formed between the rotation circles C a and C b can be used as the rotation circle of the rotation line, and the rotation circle can be used as the adsorption area of the rotation line.
在一个实施例中,S140中的根据吸附区域从场景元素中选择旋转元素的吸附元素可以包括:In one embodiment, the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
确定场景元素中的场景点元素,获取场景点元素的位置信息;根据场景点元素和旋转中心的位置信息计算场景点元素与旋转中心的距离;根据场景点元素与旋转中心的距离确定吸附区域中的场景点元素;从吸附区域中的场景点元素中选择旋转点的吸附元素。Determine the scene point element in the scene element and obtain the position information of the scene point element; calculate the distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center; determine the adsorption area according to the distance between the scene point element and the rotation center Scene point element; select the rotation point adsorption element from the scene point elements in the adsorption area.
本实施例是在确定旋转线的旋转圆环后,在场景元素中确定属于点元素的 场景点元素,在该场景点元素中选择吸附元素;其中,场景点元素的位置信息包括场景点元素的位置坐标。In this embodiment, after the rotation circle of the rotation line is determined, a scene point element belonging to a point element is determined in the scene element, and an adsorption element is selected in the scene point element; wherein the position information of the scene point element includes the scene point element. Position coordinates.
基于每个场景点元素以及旋转中心的位置坐标,可以通过如下距离公式分别计算每个场景点元素与旋转中心的距离d:Based on the position coordinates of each scene point element and the rotation center, the distance d of each scene point element from the rotation center can be calculated by the following distance formula:
Figure PCTCN2019099799-appb-000017
Figure PCTCN2019099799-appb-000017
其中,场景点元素的坐标可以表示为(x 1,y 1),旋转中心的坐标可以表示为(x 2,y 2),考虑到场景中可能存在大量的场景点元素,可以将距离的平方对应为每个场景点元素与旋转中心的距离d,这样能够减少很多次开方操作,提高运算效率。 The coordinates of the scene point elements can be expressed as (x 1 , y 1 ), and the coordinates of the rotation center can be expressed as (x 2 , y 2 ). Considering that there may be a large number of scene point elements in the scene, the distance can be squared. Corresponds to the distance d between each scene point element and the center of rotation, which can reduce many square root operations and improve computing efficiency.
根据场景点元素与旋转中心的距离d可以确定该场景点元素是否位于旋转圆环中,参考图5(c),假设场景点元素与旋转中心D的距离大于端点L a与旋转中心D之间的距离,且小于端点L b与旋转中心D之间的距离,则认为该场景点元素为吸附区域中的场景元素,即图5(c)中的P 1、P 4和P 5为所述吸附区域中的场景点元素,然后可以从P 1、P 4和P 5中选择旋转线的吸附元素。 The scene elements and the rotation center point of the distance d may be determined that the scene point in rotation of the ring element is located, with reference to FIG. 5 (c), the distance element is assumed that scene point D between the rotation center and the rotation center terminal L a is greater than D The distance between the end point L b and the rotation center D, the scene point element is considered as the scene element in the adsorption area, that is, P 1 , P 4 and P 5 in FIG. 5 (c) are described The element of the scene point is adsorbed in the region, and then the adsorbed element of the rotation line can be selected from P 1 , P 4, and P 5 .
如图5(c),可以根据场景点元素P 1、P 4和P 5与旋转线形成的夹角对场景点元素P 1、P 4和P 5进行进一步的筛选,其中场景点元素与旋转线形成的夹角可以用场景点元素、旋转中心和旋转线的端点形成的夹角表示。在一实施例中,可以遍历场景点元素P 1、P 4和P 5,第n个元素P n和旋转中心D的向量
Figure PCTCN2019099799-appb-000018
设L a和旋转中心D的向量为
Figure PCTCN2019099799-appb-000019
计算向量
Figure PCTCN2019099799-appb-000020
和向量
Figure PCTCN2019099799-appb-000021
的夹角P α,如果夹角P α小于吸附角度阈值α,那么可以把该场景点元素P n作为吸附元素,其对应的夹角P α可以作为旋转点的旋转角度,以列表的形式在如图1所示的显示平板110中进行展示,便于用于对多个场景点元素及场景点元素对应的旋转角度进行选择。
Angle as shown in FIG 5 (c), may be formed according to the scene point elements P 1, P 4 and P 5 scene point pair and the rotating elements P 1, P 4 and P 5 for further screening, wherein the rotary element scene point The angle formed by the line can be represented by the angle formed by the scene point element, the center of rotation, and the endpoint of the line of rotation. In an embodiment, the scene point elements P 1 , P 4 and P 5 can be traversed, the vector of the n-th element P n and the rotation center D
Figure PCTCN2019099799-appb-000018
Let the vector of La and rotation center D be
Figure PCTCN2019099799-appb-000019
Compute vector
Figure PCTCN2019099799-appb-000020
And vector
Figure PCTCN2019099799-appb-000021
The included angle P α , if the included angle P α is less than the adsorption angle threshold α, then the scene point element P n can be used as the adsorption element, and the corresponding included angle P α can be used as the rotation angle of the rotation point in The display on the display tablet 110 shown in FIG. 1 is convenient for selecting multiple scene point elements and rotation angles corresponding to the scene point elements.
此外,还可以根据旋转线的旋转方向在P 1、P 4和P 5中选择吸附元素。设L a和旋转中心D的向量为
Figure PCTCN2019099799-appb-000022
在场景点元素P 1、P 4和P 5中,第n个元素P n和旋转中心D的向量
Figure PCTCN2019099799-appb-000023
通过向量
Figure PCTCN2019099799-appb-000024
和向量
Figure PCTCN2019099799-appb-000025
方向的判断,可以知道该场景点元素P n是否在旋转线L的旋转方向上。如果P n不在旋转线L的旋转方向上,那么可以将该P n进行排除。假设图5(c)中的旋转线L是逆时针方向旋转,那么通过现在的计算,可以排除图5(c)中的场景点元素P n,可以将在旋转线L的旋转方向上的场景点元素P 1和P 4选择为吸附元素。
In addition, an adsorption element may be selected among P 1 , P 4, and P 5 according to the rotation direction of the rotation line. Let the vector of La and rotation center D be
Figure PCTCN2019099799-appb-000022
A vector of the n-th element P n and the rotation center D in the scene point elements P 1 , P 4, and P 5
Figure PCTCN2019099799-appb-000023
By vector
Figure PCTCN2019099799-appb-000024
And vector
Figure PCTCN2019099799-appb-000025
Judging the direction, it can be known whether the scene point element P n is in the rotation direction of the rotation line L. If P n is not in the rotation direction of the rotation line L, then this P n can be excluded. Assuming that the rotation line L in FIG. 5 (c) is rotated counterclockwise, then through the current calculation, the scene point element P n in FIG. 5 (c) can be excluded, and the scene in the rotation direction of the rotation line L can be The point elements P 1 and P 4 are selected as adsorbed elements.
在一个实施例中,S140中的根据吸附区域从场景元素中选择旋转元素的吸附元素可以包括:In one embodiment, the adsorption element that selects the rotation element from the scene elements according to the adsorption region in S140 may include:
确定场景元素中的场景线元素;获取场景线元素的位置信息;根据场景线元素的位置信息获取场景线元素与吸附区域的相交元素;从相交元素中选择旋 转线的吸附元素。Determine the scene line element in the scene element; obtain the position information of the scene line element; obtain the intersecting element of the scene line element and the adsorption area according to the position information of the scene line element; and select the adsorption element of the rotation line from the intersecting element.
在一实施例中,场景线元素包括场景中属于线段的元素,场景线元素的位置信息包括场景线元素中每个点的位置坐标,相交元素是指在场景线元素中与吸附区域交叠的元素,若场景线元素位于吸附区域中,则该场景线元素即为相交元素,若场景线元素中部分元素位于吸附区域中,则该部分元素为相交元素。在该获取的相交元素中选择旋转点的吸附元素。In an embodiment, the scene line element includes elements belonging to a line segment in the scene, the position information of the scene line element includes the position coordinates of each point in the scene line element, and the intersecting element refers to an area that overlaps with the adsorption area in the scene line element. Element, if the scene line element is located in the adsorption area, the scene line element is an intersecting element, and if a part of the scene line element is located in the adsorption area, the part element is an intersecting element. Among the acquired intersecting elements, the adsorption element of the rotation point is selected.
本实施例是在确定旋转线的旋转圆环后,在场景元素中确定属于线元素的场景线元素,根据该场景线元素与吸附区域即旋转圆环的相交元素选择旋转点的吸附元素。In this embodiment, after the rotation circle of the rotation line is determined, the scene line element belonging to the line element is determined in the scene element, and the adsorption element at the rotation point is selected according to the intersection of the scene line element and the adsorption area, that is, the rotation circle.
参考图6(a),图6(a)为本申请实施例中旋转线与场景线的一种场景位置参考示意图,在该图6(a)中,该场景包括旋转线L、旋转中心D以及场景线元素L 1、L 2、L 3和L 4,如图6(b)所示,图6(b)为本申请实施例中旋转线与场景线的另一种场景位置参考示意图,在确定场景线L的旋转区域即旋转圆周C a和旋转圆周C b之间的旋转圆环后,可以确定场景元素中的场景线元素L 1、L 2、L 3和L 4,根据每个场景线元素的位置信息如每个场景线元素上每个点的位置坐标,可以获取每个场景线元素与吸附区域的相交元素,如每个场景线元素与旋转圆环的交叠线段等,可以从多个相交元素中选择吸附元素。 Referring to FIG. 6 (a), FIG. 6 (a) is a schematic diagram of a scene position reference of a rotation line and a scene line in the embodiment of the present application. In FIG. 6 (a), the scene includes a rotation line L and a rotation center D And scene line elements L 1 , L 2 , L 3 and L 4 , as shown in FIG. 6 (b), FIG. 6 (b) is another schematic view of scene position reference of the rotation line and the scene line in the embodiment of the present application, After determining the rotation area of the scene line L, that is, the rotation circle between the rotation circle C a and the rotation circle C b , the scene line elements L 1 , L 2 , L 3, and L 4 in the scene element can be determined. The position information of the scene line elements, such as the position coordinates of each point on each scene line element, can obtain the intersecting elements of each scene line element and the adsorption area, such as the overlapping line segment of each scene line element and the rotating circle, etc. The adsorption element can be selected from multiple intersecting elements.
此外,考虑到对于两条线段来说,在其延长直线存在交点为旋转中心的情况下,才能够将其中一条线段吸附到另外一条线段当中,所以在图6(a)中,可以预先判断场景线元素L 1、L 2、L 3和L 4的延长线是否经过旋转中心D,如果不经过旋转中心D,则可以将对应的场景线元素进行排除,以提高吸附元素的选择效率。 In addition, considering that for two line segments, one of the line segments can be absorbed into the other line segment if the extension line has an intersection as the center of rotation, so in Figure 6 (a), the scene can be judged in advance line element L 1, L 2, L 3 and L 4 whether the extension line through the rotation center D, if not through the rotation center D, then the corresponding scene may be negative line elements, in order to improve the adsorption efficiency of selection elements.
在一实施例中,如图6(b),因为场景线元素L 1不存在经过旋转中心D的延长线,所以可以排除场景线元素L 1,又因为场景线元素L 2和L 4不在旋转圆周C a和旋转圆周C b之间,很容易看出,无论旋转线L怎么旋转,都无法与L 2或L 4重叠,所以可以排除L 2和L 4In an embodiment, as shown in FIG. 6 (b), because the scene line element L 1 does not have an extension line passing through the rotation center D, the scene line element L 1 can be excluded, and because the scene line elements L 2 and L 4 are not rotated. Between the circle C a and the rotation circle C b , it is easy to see that no matter how the rotation line L rotates, it cannot overlap with L 2 or L 4 , so L 2 and L 4 can be excluded.
本实施例中,计算场景线元素是否在旋转圆环中的算法,可以转换为求区间的包含关系。假设旋转线L的端点L a和旋转中心D的距离的平方为d a,端点L b和旋转中心D的距离的平方d b,假设集合P L中包含有L 1、L 2、L 3和L 4,集合P L的第n个场景线元素PL n的两个端点分别为PL na和PL nb,分别与旋转中心D的距离为d pa和d pb,求PL n是否在旋转线L的旋转圆环中可以转换为求d a,d b和d pa,d pb是否存在重叠部分的问题,可以把d a,d b和d pa,d pb在数轴上表示,如果区间[d a,d b]和区间[d pa,d pb]存在重叠部分,那么就可以判断场景线元素PL n在旋转线L旋转一定角度后可以吸附,其中,区间重叠算法如下: In this embodiment, an algorithm for calculating whether a scene line element is in a rotating circle can be converted into an interval containing relationship. Suppose square of the distance L is L a and the rotation center D of the end rotary line d squared d b a, the distance L B and the rotation center D of endpoints, the set of hypotheses P L contains L 1, L 2, L 3, and L 4, two end points set P L of the n-th line elements of the scene, respectively n PL and PL na PL nb, respectively, from the center of rotation, and D is d pa d pb, seeking whether PL n L in a rotary line rotation of the ring may be converted for the sake d a, d b, and d pa, d pb question of whether an overlapping portion is present, can be d a, d b, and d pa, d pb represented on the number line, if the interval [d a, d b ] and the interval [d pa , d pb ] overlap, then it can be judged that the scene line element PL n can be adsorbed after the rotation line L is rotated by a certain angle. The interval overlap algorithm is as follows:
假设存在两个区间[a 1,b 1],[a 2,b 2],求两个区间是否存在重叠部分,如果[min(b1,b2)-max(a1,a2)]的值大于或等于0,那么两个区间存在重叠部分。参考图6(c),图6(c)为本申请实施例中旋转线与场景线的又一种场景位置参考示 意图,假设集合P L的第n个场景线元素PL n的一个端点PL na和旋转中心D的向量为
Figure PCTCN2019099799-appb-000026
旋转线L的端点L a和旋转中心D的向量
Figure PCTCN2019099799-appb-000027
则可以通过向量
Figure PCTCN2019099799-appb-000028
Figure PCTCN2019099799-appb-000029
判断向量旋转方向是否和旋转线L的旋转方向相同,并且如果
Figure PCTCN2019099799-appb-000030
Figure PCTCN2019099799-appb-000031
的夹角P α小于吸附角度阈值α,那么可以把该场景线元素L n作为吸附元素,其对应的夹角P α可以作为旋转线的旋转角度以列表的形式在如图1所示的显示平板110中进行展示,便于用户对多条旋转线及其旋转角度进行选择。
Assume that there are two intervals [a 1 , b 1 ], [a 2 , b 2 ], and find whether there is an overlap between the two intervals. If the value of [min (b1, b2) -max (a1, a2)] is greater than or Equal to 0, then there is overlap between the two intervals. Referring to FIG 6 (c), FIG. 6 (c) rotating the line embodiment of the present application scene of still another embodiment of the line position reference scene schematic, assuming a set of endpoints P L of the n-th line elements of the scene of n PL PL na And the vector of rotation center D is
Figure PCTCN2019099799-appb-000026
Vector rotation terminal L a line L and the center of rotation D
Figure PCTCN2019099799-appb-000027
You can pass the vector
Figure PCTCN2019099799-appb-000028
with
Figure PCTCN2019099799-appb-000029
Determine whether the rotation direction of the vector is the same as the rotation direction of the rotation line L, and if
Figure PCTCN2019099799-appb-000030
with
Figure PCTCN2019099799-appb-000031
The included angle P α is less than the adsorption angle threshold α, then the scene line element L n can be used as the adsorption element, and the corresponding included angle P α can be used as the rotation angle of the rotation line in a list form as shown in FIG. 1. The display in the flat plate 110 is convenient for the user to select a plurality of rotation lines and their rotation angles.
在一个实施例中,提供了一种旋转元素的吸附元素选择装置,参考图7,图7为本申请实施例中旋转元素的吸附元素选择装置的结构示意图,包括旋转元素选取模块101、位置信息获取模块102、吸附区域计算模块103以及吸附元素选择模块104。In one embodiment, a rotating element adsorption element selection device is provided. Referring to FIG. 7, FIG. 7 is a schematic structural diagram of a rotating element adsorption element selection device according to an embodiment of the present application, including a rotation element selection module 101 and position information. The acquisition module 102, the adsorption region calculation module 103, and the adsorption element selection module 104.
旋转元素选取模块101,设置为选取旋转元素并确定所述旋转元素的旋转中心;The rotation element selection module 101 is configured to select a rotation element and determine a rotation center of the rotation element;
位置信息获取模块102,设置为获取所述旋转元素和旋转中心的位置信息;A position information acquisition module 102, configured to acquire position information of the rotation element and the rotation center;
吸附区域计算模块103,设置为根据所述旋转元素和旋转中心的位置信息计算所述旋转元素的吸附区域;The adsorption region calculation module 103 is configured to calculate the adsorption region of the rotation element according to the position information of the rotation element and the rotation center;
吸附元素选择模块104,设置为根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素。The adsorption element selection module 104 is configured to select an adsorption element of the rotating element from a scene element according to the adsorption region.
上述旋转元素的吸附元素选择装置,使得在对旋转元素进行旋转操作时能够选择旋转元素的吸附元素,可以用于在将该旋转元素进行旋转时吸附,使得该旋转元素进行旋转的过程中可以快速旋转至吸附元素的位置,克服了相关技术需要对旋转元素进行多次位置调整的问题,提高了旋转元素的操作效率。The above-mentioned rotating element adsorption element selection device enables the selection of the adsorption element of the rotation element when the rotation element is rotated, and can be used to adsorb the rotation element when the rotation element is rotated, so that the rotation element can be quickly rotated during the rotation process. Rotating to the position of the adsorbed element overcomes the problem that the related technology needs to adjust the position of the rotating element multiple times, and improves the operating efficiency of the rotating element.
在一个实施例中,所述吸附元素选择模块104可以包括:In one embodiment, the adsorption element selection module 104 may include:
元素设置单元,设置为将所述吸附区域中的场景元素设为备选元素;方向确定单元,设置为确定所述旋转元素的旋转方向;第一选取单元,设置为根据所述旋转方向从所述备选元素中选取所述吸附元素。An element setting unit configured to set a scene element in the adsorption area as a candidate element; a direction determination unit configured to determine a rotation direction of the rotation element; a first selection unit configured to be selected from the rotation direction according to the rotation direction The adsorption element is selected from the candidate elements.
在一个实施例中,所述第一选取单元可以包括:In one embodiment, the first selecting unit may include:
角度确定单元,设置为根据所述旋转元素的旋转方向确定所述备选元素与旋转元素的旋转角度;第二选取单元,设置为根据所述旋转角度在所述备选元素中选取所述吸附元素。An angle determination unit configured to determine a rotation angle of the candidate element and the rotation element according to a rotation direction of the rotation element; a second selection unit configured to select the adsorption among the candidate elements according to the rotation angle element.
在一个实施例中,所述元素选择单元可以包括:In one embodiment, the element selection unit may include:
阈值比较单元,设置为将所述旋转角度与设定的吸附角度阈值进行比较;第三选取单元,设置为响应于所述旋转角度小于吸附角度阈值,从所述备选元素中选择所述吸附元素。A threshold comparing unit configured to compare the rotation angle with a set adsorption angle threshold; a third selection unit configured to select the adsorption from the candidate elements in response to the rotation angle being smaller than the adsorption angle threshold element.
在一个实施例中,所述吸附区域计算模块103可以包括:In one embodiment, the adsorption area calculation module 103 may include:
路径计算单元,设置为根据所述旋转元素和旋转中心的位置信息计算所述旋转元素的旋转路径;区域确定单元,设置为根据所述旋转路径确定所述旋转元素的吸附区域。The path calculation unit is configured to calculate a rotation path of the rotation element according to the position information of the rotation element and the rotation center; and the region determination unit is configured to determine an adsorption region of the rotation element according to the rotation path.
在一个实施例中,所述区域确定单元可以包括:In one embodiment, the area determining unit may include:
误差获取单元,设置为获取设定的路径误差值;区域设置单元,设置为根据所述路径误差值和旋转路径设置所述旋转元素的吸附区域。The error obtaining unit is configured to obtain a set path error value; and the area setting unit is configured to set an adsorption region of the rotation element according to the path error value and a rotation path.
在一个实施例中,所述旋转元素为旋转点;所述吸附区域计算模块103是设置为:In one embodiment, the rotation element is a rotation point; the adsorption area calculation module 103 is configured to:
根据所述旋转点和旋转中心的位置信息计算所述旋转点与旋转中心的距离;根据所述旋转点和旋转中心的距离计算所述旋转点的旋转圆周;根据所述旋转圆周确定所述旋转点的吸附区域。Calculate the distance between the rotation point and the rotation center according to the position information of the rotation point and the rotation center; calculate the rotation circle of the rotation point according to the distance between the rotation point and the rotation center; determine the rotation according to the rotation circle Point of adsorption area.
在一个实施例中,所述吸附元素选择模块104是设置为:In one embodiment, the adsorption element selection module 104 is configured to:
确定所述场景元素中的场景点元素,获取所述场景点元素的位置信息;第一根据所述场景点元素和旋转中心的位置信息计算所述场景点元素与旋转中心的距离;根据所述场景点元素与旋转中心的距离确定所述吸附区域中的场景点元素;从所述吸附区域中的场景点元素中选择所述旋转点的吸附元素。Determine a scene point element in the scene element, and obtain position information of the scene point element; first calculate a distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center; and according to the The distance between the scene point element and the rotation center determines the scene point element in the adsorption region; and selecting the rotation point adsorption element from the scene point elements in the adsorption region.
在一个实施例中,所述吸附元素选择模块104是设置为:In one embodiment, the adsorption element selection module 104 is configured to:
确定所述场景元素中的场景线元素;获取所述场景线元素的位置信息;根据所述场景线元素的位置信息获取所述场景线元素与吸附区域的相交元素;从所述相交元素中选择所述旋转点的吸附元素。Determining a scene line element in the scene element; obtaining position information of the scene line element; obtaining an intersection element of the scene line element and an adsorption area according to the position information of the scene line element; selecting from the crossing element Adsorption element at the rotation point.
在一个实施例中,所述旋转元素为旋转线;所述吸附区域计算模块103是设置为:In one embodiment, the rotation element is a rotation line; the adsorption area calculation module 103 is configured to:
根据所述旋转线的位置信息获取所述旋转线的两个端点的位置信息;根据两个端点的位置信息和旋转中心的位置信息计算两个端点分别与所述旋转中心的距离;根据两个端点分别与所述旋转中心的距离确定所述旋转线的旋转圆环;根据所述旋转圆环获取所述旋转线的吸附区域。Obtain the position information of the two endpoints of the rotation line according to the position information of the rotation line; calculate the distances between the two endpoints and the rotation center respectively according to the position information of the two endpoints and the position information of the rotation center; A distance between an end point and the rotation center determines a rotation circle of the rotation line; and an adsorption area of the rotation line is obtained according to the rotation circle.
在一个实施例中,所述吸附元素选择模块104是设置为:In one embodiment, the adsorption element selection module 104 is configured to:
确定所述场景元素中的场景点元素,获取所述场景点元素的位置信息;根据所述场景点元素和旋转中心的位置信息计算所述场景点元素与旋转中心的距离;根据所述场景点元素与旋转中心的距离确定所述吸附区域中的场景点元素;从所述吸附区域中的场景点元素中选择所述旋转点的吸附元素。Determine a scene point element in the scene element, and obtain position information of the scene point element; calculate a distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center; The distance between the element and the rotation center determines the scene point element in the adsorption area; and selecting the rotation point adsorption element from the scene point elements in the adsorption area.
在一个实施例中,所述吸附元素选择模块104是设置为:In one embodiment, the adsorption element selection module 104 is configured to:
确定所述场景元素中的场景线元素;获取所述场景线元素的位置信息;根 据所述场景线元素的位置信息获取所述场景线元素与所述吸附区域的相交元素;从所述相交元素中选择所述旋转线的吸附元素。Determining a scene line element in the scene element; obtaining position information of the scene line element; obtaining an intersecting element of the scene line element and the adsorption area according to the position information of the scene line element; from the intersecting element The adsorption element of the rotation line is selected.
关于旋转元素的吸附元素选择装置的限定可以参见上文中对于旋转元素的吸附元素选择方法的限定,在上述旋转元素的吸附元素选择方法的实施例阐述的技术特征及其效果均适用于旋转元素的吸附元素选择装置的实施例中,在此不再赘述。上述旋转元素的吸附元素选择装置中的每个模块可全部或部分通过软件、硬件及其组合来实现。上述每个模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上每个模块对应的操作。Regarding the limitation of the adsorption element selection device of the rotating element, please refer to the limitation on the selection method of the adsorption element of the rotation element described above. The technical characteristics and effects described in the embodiment of the selection method of the adsorption element of the rotation element are applicable to the rotation element In the embodiment of the adsorption element selection device, details are not described herein again. Each module in the above-mentioned rotating element adsorption element selection device may be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above modules may be embedded in a processor in a hardware form or independent of a processor in a computer device, or may be stored in a memory of a computer device in a software form, so that the processor can call and execute the operations corresponding to each of the above modules.
在一个实施例中,提供一种旋转吸附方法,该方法可以包括如下步骤:In one embodiment, a spin adsorption method is provided. The method may include the following steps:
根据如上任一项实施例所述的旋转元素的吸附元素选择方法选择旋转元素的吸附元素;将该旋转元素旋转吸附至吸附元素。According to the method for selecting an adsorbed element of a rotating element according to any one of the above embodiments, the adsorbed element of the rotated element is selected; the rotated element is adsorbed to the adsorbed element by rotation.
本实施例的旋转吸附方法可以应用于如图1所示的交互智能平板100中,用户可以通过该交互智能平板100的显示平板110对显示的场景元素进行操作,交互智能平板100可以将用户选择的场景元素选取为旋转元素,该旋转元素可以是点元素或线元素,交互智能平板100根据如上任一项实施例所述的旋转元素的吸附元素选择方法,在场景元素中选择出该旋转元素的吸附元素,并在旋转元素旋转到靠近吸附元素时将该旋转元素快速吸附到吸附元素的位置处,在如使用交互智能平板100进行现场教学或制作教学课件的应用中,可以方便用户画出重叠的线,或者将新画的线吸附到之前画的线当中,还可以在直尺旋转过程中将该直尺吸附到三角板的斜边,提高对场景元素的操作效率。The rotation adsorption method of this embodiment can be applied to the interactive smart tablet 100 shown in FIG. 1. The user can operate the displayed scene elements through the display tablet 110 of the interactive smart tablet 100, and the interactive smart tablet 100 can select the user. The scene element is selected as a rotation element, and the rotation element may be a point element or a line element. The interactive smart tablet 100 selects the rotation element among the scene elements according to the adsorption element selection method for a rotation element according to any one of the above embodiments. And quickly adsorb the rotating element to the position of the adsorbed element when the rotating element is rotated close to the adsorbed element. In applications such as using the interactive smart tablet 100 for field teaching or making teaching courseware, it is convenient for users to draw The overlapping lines, or the newly drawn lines are absorbed into the previously drawn lines, and the ruler can be attracted to the hypotenuse of the triangular plate during the rotation of the ruler to improve the operating efficiency of the scene elements.
在一个实施例中,提供了一种旋转吸附装置,可以包括:In one embodiment, a rotary adsorption device is provided, which may include:
元素确定模块,设置为根据如上任一项实施例所述的旋转元素的吸附元素选择方法选择旋转元素的吸附元素;An element determination module, configured to select an adsorption element of a rotation element according to the method for selecting an adsorption element of a rotation element according to any one of the above embodiments;
元素吸附模块,设置为将所述旋转元素旋转吸附至所述吸附元素。The element adsorption module is configured to rotationally adsorb the rotating element to the adsorbed element.
上述旋转吸附方法和装置,能够在对旋转元素进行旋转时先选择该旋转元素的吸附元素,使得在该旋转元素进行旋转的过程中,可以将该旋转元素快速地旋转吸附至吸附元素的位置,实现了对旋转元素的旋转吸附操作,提高了旋转元素的操作效率。The above rotation adsorption method and device can first select the adsorption element of the rotation element when rotating the rotation element, so that during the rotation of the rotation element, the rotation element can be quickly rotated and adsorbed to the position of the adsorption element, The rotation adsorption operation of the rotating elements is realized, and the operation efficiency of the rotating elements is improved.
关于旋转吸附装置的限定可以参见上文中对于旋转吸附方法的限定,在上述旋转吸附方法的实施例阐述的技术特征及其效果均适用于旋转吸附装置的实施例中。上述旋转吸附装置中的每个模块可全部或部分通过软件、硬件及其组合来实现。上述每个模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上每个模块对应的操作。Regarding the limitation of the rotary adsorption device, please refer to the limitation on the rotary adsorption method described above. The technical features and effects described in the above embodiments of the rotary adsorption method are applicable to the embodiments of the rotary adsorption device. Each module in the above-mentioned rotary adsorption device can be realized in whole or in part by software, hardware, and a combination thereof. Each of the above modules may be embedded in a processor in a hardware form or independent of a processor in a computer device, or may be stored in a memory of a computer device in a software form, so that the processor can call and execute the operations corresponding to each of the above modules.
在一个实施例中,提供了一种交互智能平板,交互智能平板内部结构图可 以如图8所示,图8为本申请实施例中交互智能平板的结构示意图,该交互智能平板可以包括通过***总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该交互智能平板的处理器用于提供计算和控制能力。该交互智能平板的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***和计算机程序。该内存储器为非易失性存储介质中的操作***和计算机程序的运行提供环境。该交互智能平板的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种旋转元素的吸附元素选择方法或旋转吸附方法。该交互智能平板的显示屏可以是液晶触控显示屏,该交互智能平板的输入装置可以是显示屏上覆盖的触摸层,也可以是交互智能平板外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, an interactive smart tablet is provided. The internal structure diagram of the interactive smart tablet can be shown in FIG. 8. FIG. 8 is a schematic structural diagram of the interactive smart tablet in the embodiment of the present application. The interactive smart tablet may include a communication system. Bus-connected processors, memories, network interfaces, displays and input devices. The processor of the interactive smart tablet is used to provide computing and control capabilities. The memory of the interactive smart tablet includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running an operating system and computer programs in a non-volatile storage medium. The network interface of the interactive smart tablet is used to communicate with external terminals through a network connection. When the computer program is executed by a processor, a method for selecting a rotating element or a rotating adsorption method is implemented. The display screen of the interactive smart tablet may be a liquid crystal touch display screen, and the input device of the interactive smart tablet may be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the interactive smart tablet housing. , Or an external keyboard, trackpad, or mouse.
图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的交互智能平板的限定,交互智能平板可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The structure shown in FIG. 8 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 interactive smart tablet to which the solution of the present application is applied. The interactive smart tablet may include more than shown in the figure. There are more or fewer parts, or some parts are combined, or there are different parts arrangements.
在一个实施例中,提供了一种交互智能平板,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:In one embodiment, an interactive smart tablet is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
选取旋转元素并确定该旋转元素的旋转中心;获取旋转元素和旋转中心的位置信息;根据旋转元素和旋转中心的位置信息计算该旋转元素的吸附区域;根据吸附区域从场景元素中选择旋转元素的吸附元素。Select the rotation element and determine the rotation center of the rotation element; obtain the position information of the rotation element and the rotation center; calculate the adsorption area of the rotation element according to the position information of the rotation element and the rotation center; select the rotation element from the scene elements according to the adsorption area Adsorption of elements.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
根据旋转元素和旋转中心的位置信息计算旋转元素的旋转路径;根据旋转路径确定旋转元素的吸附区域。The rotation path of the rotation element is calculated according to the position information of the rotation element and the rotation center; the adsorption area of the rotation element is determined according to the rotation path.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
获取设定的路径误差值;根据路径误差值和旋转路径设置旋转元素的吸附区域。Get the set path error value; set the adsorption area of the rotating element according to the path error value and the rotation path.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
将吸附区域中的场景元素设为备选元素;确定旋转元素的旋转方向;根据旋转方向从备选元素中选取吸附元素。Set the scene element in the adsorption area as a candidate element; determine the rotation direction of the rotation element; and select the adsorption element from the candidate elements according to the rotation direction.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
根据旋转元素的旋转方向确定备选元素与旋转元素的旋转角度;根据旋转角度在备选元素中选取吸附元素。The rotation angle of the candidate element and the rotation element is determined according to the rotation direction of the rotation element; the adsorption element is selected from the candidate elements according to the rotation angle.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
将旋转角度与设定的吸附角度阈值进行比较;响应于旋转角度小于吸附角度阈值,从备选元素中选择吸附元素。The rotation angle is compared with a set adsorption angle threshold; in response to the rotation angle being smaller than the adsorption angle threshold, an adsorption element is selected from the candidate elements.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
根据旋转点和旋转中心的位置信息计算旋转点与旋转中心的距离;根据旋转点和旋转中心的距离计算旋转点的旋转圆周;根据旋转圆周确定旋转点的吸附区域。The distance between the rotation point and the rotation center is calculated according to the position information of the rotation point and the rotation center; the rotation circle of the rotation point is calculated according to the distance between the rotation point and the rotation center; and the adsorption area of the rotation point is determined according to the rotation circle.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
根据旋转线的位置信息获取旋转线的两个端点的位置信息;根据两个端点的位置信息和旋转中心的位置信息计算两个端点分别与旋转中心的距离;根据两个端点分别与旋转中心的距离确定旋转线的旋转圆环;根据旋转圆环获取旋转线的吸附区域。The position information of the two endpoints of the rotation line is obtained according to the position information of the rotation line. The distances between the two endpoints and the rotation center are calculated according to the position information of the two endpoints and the position information of the rotation center. The distance determines the rotation circle of the rotation line; the adsorption area of the rotation line is obtained according to the rotation circle.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
确定场景元素中的场景点元素,获取场景点元素的位置信息;根据场景点元素和旋转中心的位置信息计算场景点元素与旋转中心的距离;根据场景点元素与旋转中心的距离确定吸附区域中的场景点元素;从吸附区域中的场景点元素中选择旋转点的吸附元素。Determine the scene point element in the scene element and obtain the position information of the scene point element; calculate the distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center; determine the adsorption area according to the distance between the scene point element and the rotation center Scene point element; select the rotation point adsorption element from the scene point elements in the adsorption area.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor executes the computer program to further implement the following steps:
确定场景元素中的场景线元素;获取场景线元素的位置信息;根据场景线元素的位置信息获取场景线元素与吸附区域的相交元素;从相交元素中选择旋转线的吸附元素。Determine the scene line element in the scene element; obtain the position information of the scene line element; obtain the intersecting element of the scene line element and the adsorption area according to the position information of the scene line element; and select the adsorption element of the rotation line from the intersecting element.
在一个实施例中,提供了一种交互智能平板,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:In one embodiment, an interactive smart tablet is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
根据如上任一项实施例所述的旋转元素的吸附元素选择方法选择旋转元素的吸附元素;将该旋转元素旋转吸附至吸附元素。According to the method for selecting an adsorbed element of a rotating element according to any one of the above embodiments, the adsorbed element of the rotated element is selected; the rotated element is adsorbed to the adsorbed element by rotation.
上述任一项实施例所述的交互智能平板,通过所述处理器上运行的计算机程序,能够在对旋转元素进行旋转时先选择该旋转元素的吸附元素,使得该旋转元素在进行旋转的过程中,可以将该旋转元素快速地旋转吸附至吸附元素的位置,实现对旋转元素的旋转吸附操作,提高了旋转元素的操作效率。The interactive smart tablet according to any one of the foregoing embodiments, through the computer program running on the processor, can first select the adsorption element of the rotation element when rotating the rotation element, so that the rotation element is in the process of rotation In the invention, the rotating element can be quickly and rotationally adsorbed to the position of the adsorbed element to realize the rotational adsorption operation of the rotational element, and the operation efficiency of the rotational element is improved.
实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述每个方法的实施例的流程。其中,本申请所提供的每个实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、可编程ROM(Programmable Read-Only Memory,PROM)、电可编程ROM(Electrically Programmable Read-Only-Memory,EPROM)、电可擦除可编程ROM(Electrically Erasable Programmable Read-Only Memory,EEPROM)或闪存。易失性存储器可包括随机存取存储器(Random  Access Memory,RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(Static Random Access Memory,SRAM)、动态RAM(Dynamic Random Access Memory,DRAM)、同步DRAM(Synchronous Dynamic Random Access Memory,SDRAM)、双数据率SDRAM(Double Data Rate Synchronous Dynamic Random Access Memory,DDRSDRAM)、增强型SDRAM(Enhanced Synchronous Dynamic Random Access Memory,ESDRAM)、同步链路(Sync link)DRAM(Sync Link Dynamic Random Access Memory,SLDRAM)、存储器总线(Rambus)直接RAM(Rambus Direct Random Access Memory,RDRAM)、直接存储器总线动态RAM(Direct Rambus Dynamic Random Access Memory,DRDRAM)、以及存储器总线动态RAM(Rambus Dynamic Random Access Memory,RDRAM)等。The realization of all or part of the processes in the method of the above embodiment can be completed by instructing related hardware by a computer program, which can be stored in a non-volatile computer-readable storage medium. The computer program is When executed, the process of the embodiment of each method may be included. Wherein, any reference to the memory, storage, database, or other media used in each embodiment provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Electrically Programmable ROM (Electrically Programmable Read-Only-Memory (EPROM), Electrically Readable Memory Erasable Programmable ROM (Erasrable, Programmable, Read-Only Memory, EEPROM) or flash memory. The volatile memory may include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (Static Random Access Memory, SRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (Synchronous Random Access Memory, SDRAM), dual Data rate SDRAM (Double Data Rate Synchronous Dynamic Access Memory, DDRSDRAM), Enhanced SDRAM (Enhanced Synchronous Dynamic Dynamic Access Memory, ESDRAM), Synchronous Link (Sync Link) DRAM (Sync Link Dynamic Dynamic Random Access Memory, SLDRAM), memory Bus (Rambus) Direct RAM (Random Access Memory, RDRAM), Direct Memory Bus Dynamic RAM (Rambus Dynamic Access Memory, DRDRAM), and Memory Bus Dynamic RAM (Rambus Dynamic Access Memory, RDRAM).
据此,在一个实施例中,提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:Accordingly, in one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
选取旋转元素并确定该旋转元素的旋转中心;获取旋转元素和旋转中心的位置信息;根据旋转元素和旋转中心的位置信息计算该旋转元素的吸附区域;根据吸附区域从场景元素中选择旋转元素的吸附元素。Select the rotation element and determine the rotation center of the rotation element; obtain the position information of the rotation element and the rotation center; calculate the adsorption area of the rotation element according to the position information of the rotation element and the rotation center; select the rotation element from the scene elements according to the adsorption area Adsorption of elements.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
根据旋转元素和旋转中心的位置信息计算旋转元素的旋转路径;根据旋转路径确定旋转元素的吸附区域。The rotation path of the rotation element is calculated according to the position information of the rotation element and the rotation center; the adsorption area of the rotation element is determined according to the rotation path.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
获取设定的路径误差值;根据路径误差值和旋转路径设置旋转元素的吸附区域。Get the set path error value; set the adsorption area of the rotating element according to the path error value and the rotation path.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
将吸附区域中的场景元素设为备选元素;确定旋转元素的旋转方向;根据旋转方向从备选元素中选取吸附元素。Set the scene element in the adsorption area as a candidate element; determine the rotation direction of the rotation element; and select the adsorption element from the candidate elements according to the rotation direction.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
根据旋转元素的旋转方向确定备选元素与旋转元素的旋转角度;根据旋转角度在备选元素中选取吸附元素。The rotation angle of the candidate element and the rotation element is determined according to the rotation direction of the rotation element; the adsorption element is selected from the candidate elements according to the rotation angle.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
将旋转角度与设定的吸附角度阈值进行比较;若旋转角度小于吸附角度阈值,则从备选元素中选择吸附元素。Compare the rotation angle with the set adsorption angle threshold; if the rotation angle is less than the adsorption angle threshold, select an adsorption element from the candidate elements.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
根据旋转点和旋转中心的位置信息计算旋转点与旋转中心的距离;根据旋转点和旋转中心的距离计算旋转点的旋转圆周;根据旋转圆周确定旋转点的吸附区域。The distance between the rotation point and the rotation center is calculated according to the position information of the rotation point and the rotation center; the rotation circle of the rotation point is calculated according to the distance between the rotation point and the rotation center; and the adsorption area of the rotation point is determined according to the rotation circle.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
根据旋转线的位置信息获取旋转线的两个端点的位置信息;根据两个端点的位置信息和旋转中心的位置信息计算两个端点分别与旋转中心的距离;根据两个端点分别与旋转中心的距离确定旋转线的旋转圆环;根据旋转圆环获取旋转线的吸附区域。The position information of the two endpoints of the rotation line is obtained according to the position information of the rotation line. The distances between the two endpoints and the rotation center are calculated according to the position information of the two endpoints and the position information of the rotation center. The distance determines the rotation circle of the rotation line; the adsorption area of the rotation line is obtained according to the rotation circle.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
确定场景元素中的场景点元素,获取场景点元素的位置信息;根据场景点元素和旋转中心的位置信息计算场景点元素与旋转中心的距离;根据场景点元素与旋转中心的距离确定吸附区域中的场景点元素;从吸附区域中的场景点元素中选择旋转点的吸附元素。Determine the scene point element in the scene element and obtain the position information of the scene point element; calculate the distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center; determine the adsorption area according to the distance between the scene point element and the rotation center Scene point element; select the rotation point adsorption element from the scene point elements in the adsorption area.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program when executed by the processor further implements the following steps:
确定场景元素中的场景线元素;获取场景线元素的位置信息;根据场景线元素的位置信息获取场景线元素与吸附区域的相交元素;从相交元素中选择旋转线的吸附元素。Determine the scene line element in the scene element; obtain the position information of the scene line element; obtain the intersecting element of the scene line element and the adsorption area according to the position information of the scene line element; and select the adsorption element of the rotation line from the intersecting element.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
根据如上任一项实施例所述的旋转元素的吸附元素选择方法选择旋转元素的吸附元素;将该旋转元素旋转吸附至吸附元素。According to the method for selecting an adsorbed element of a rotating element according to any one of the above embodiments, the adsorbed element of the rotated element is selected; the rotated element is adsorbed to the adsorbed element by rotation.
上述任一项实施例所述的计算机可读存储介质,通过该计算机可读存储介质存储的计算机程序,能够在对旋转元素进行旋转时先选择该旋转元素的吸附元素,使得该旋转元素在进行旋转的过程中,可以将该旋转元素快速地旋转吸附至吸附元素的位置,实现对旋转元素的旋转吸附操作,提高了旋转元素的操作效率。The computer-readable storage medium according to any one of the foregoing embodiments. Through the computer program stored in the computer-readable storage medium, when rotating a rotating element, an adsorption element of the rotating element can be selected first, so that the rotating element is being processed. During the rotation process, the rotating element can be quickly rotated and adsorbed to the position of the adsorbed element, so that the rotational adsorption operation of the rotated element is realized, and the operation efficiency of the rotated element is improved.
以上所述实施例的多个技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的多个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The multiple technical features of the embodiments described above can be arbitrarily combined. In order to make the description concise, all possible combinations of the multiple technical features in the above embodiments have not been described. However, as long as the combination of these technical features does not exist Any contradiction should be regarded as the scope recorded in this specification.

Claims (23)

  1. 一种旋转元素的吸附元素选择方法,包括:An adsorption element selection method for rotating elements, including:
    选取旋转元素并确定所述旋转元素的旋转中心;Selecting a rotation element and determining a rotation center of the rotation element;
    获取所述旋转元素和所述旋转中心的位置信息;Acquiring position information of the rotation element and the rotation center;
    根据所述旋转元素和所述旋转中心的位置信息计算所述旋转元素的吸附区域;Calculating an adsorption area of the rotation element according to the position information of the rotation element and the rotation center;
    根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素。The adsorption element of the rotating element is selected from the scene elements according to the adsorption region.
  2. 根据权利要求1所述的方法,其中,所述根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素,包括:The method according to claim 1, wherein the selecting an adsorption element of the rotation element from a scene element according to the adsorption region comprises:
    将所述吸附区域中的场景元素设为备选元素;Setting scene elements in the adsorption area as candidate elements;
    确定所述旋转元素的旋转方向;Determining a rotation direction of the rotation element;
    根据所述旋转方向从所述备选元素中选取所述吸附元素。The adsorption element is selected from the candidate elements according to the rotation direction.
  3. 根据权利要求2所述的方法,其中,所述根据所述旋转方向从所述备选元素中选取所述吸附元素,包括:The method according to claim 2, wherein the selecting the adsorbed element from the candidate elements according to the rotation direction comprises:
    根据所述旋转元素的旋转方向确定所述备选元素与所述旋转元素的旋转角度;Determining a rotation angle between the candidate element and the rotation element according to a rotation direction of the rotation element;
    根据所述旋转角度在所述备选元素中选取所述吸附元素。The adsorption element is selected from the candidate elements according to the rotation angle.
  4. 根据权利要求3所述的方法,其中,所述根据所述旋转角度在所述备选元素中选取所述吸附元素,包括:The method according to claim 3, wherein the selecting the adsorption element among the candidate elements according to the rotation angle comprises:
    将所述旋转角度与设定的吸附角度阈值进行比较;Comparing the rotation angle with a set adsorption angle threshold;
    响应于所述旋转角度小于吸附角度阈值,从所述备选元素中选择所述吸附元素。In response to the rotation angle being less than the adsorption angle threshold, the adsorption element is selected from the candidate elements.
  5. 根据权利要求1所述的方法,其中,所述根据所述旋转元素和所述旋转中心的位置信息计算所述旋转元素的吸附区域,包括:The method according to claim 1, wherein the calculating the adsorption area of the rotation element based on the position information of the rotation element and the rotation center comprises:
    根据所述旋转元素和所述旋转中心的位置信息计算所述旋转元素的旋转路径;Calculating a rotation path of the rotation element according to the position information of the rotation element and the rotation center;
    根据所述旋转路径确定所述旋转元素的吸附区域。An adsorption region of the rotation element is determined according to the rotation path.
  6. 根据权利要求5所述的方法,其中,所述根据所述旋转路径确定所述旋转元素的吸附区域,包括:The method according to claim 5, wherein the determining the adsorption region of the rotation element according to the rotation path comprises:
    获取设定的路径误差值;Get the set path error value;
    根据所述路径误差值和所述旋转路径设置所述旋转元素的吸附区域。An adsorption region of the rotation element is set according to the path error value and the rotation path.
  7. 根据权利要求1至6任一项所述的方法,其中,所述旋转元素包括旋转点或旋转线。The method according to any one of claims 1 to 6, wherein the rotation element includes a rotation point or a rotation line.
  8. 根据权利要求7所述的方法,其中,The method according to claim 7, wherein:
    所述旋转元素为旋转点;The rotation element is a rotation point;
    所述根据所述旋转元素和所述旋转中心的位置信息计算所述旋转元素的吸附区域,包括:The calculating the adsorption area of the rotating element according to the position information of the rotating element and the rotation center includes:
    根据所述旋转点和所述旋转中心的位置信息计算所述旋转点与所述旋转中心的距离;Calculating a distance between the rotation point and the rotation center according to position information of the rotation point and the rotation center;
    根据所述旋转点和所述旋转中心的距离计算所述旋转点的旋转圆周;Calculating a rotation circle of the rotation point according to a distance between the rotation point and the rotation center;
    根据所述旋转圆周确定所述旋转点的吸附区域。An adsorption area of the rotation point is determined according to the rotation circle.
  9. 根据权利要求8所述的方法,其中,所述根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素,包括:The method according to claim 8, wherein the selecting an adsorption element of the rotation element from a scene element according to the adsorption region comprises:
    确定所述场景元素中的场景点元素,获取所述场景点元素的位置信息;Determining a scene point element in the scene element, and obtaining position information of the scene point element;
    根据所述场景点元素和所述旋转中心的位置信息计算所述场景点元素与所述旋转中心的距离;Calculating a distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center;
    根据所述场景点元素与所述旋转中心的距离确定所述吸附区域中的场景点元素;Determining a scene point element in the adsorption area according to a distance between the scene point element and the rotation center;
    从所述吸附区域中的场景点元素中选择所述旋转点的吸附元素。The adsorption element of the rotation point is selected from the scene point elements in the adsorption region.
  10. 根据权利要求8所述的方法,其中,所述根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素,包括:The method according to claim 8, wherein the selecting an adsorption element of the rotation element from a scene element according to the adsorption region comprises:
    确定所述场景元素中的场景线元素;获取所述场景线元素的位置信息;Determining a scene line element in the scene element; obtaining position information of the scene line element;
    根据所述场景线元素的位置信息获取所述场景线元素与所述吸附区域的相交元素;Obtaining intersecting elements of the scene line element and the adsorption area according to the position information of the scene line element;
    从所述相交元素中选择所述旋转点的吸附元素。The adsorbed element of the rotation point is selected from the intersecting elements.
  11. 根据权利要求7所述的方法,其中,The method according to claim 7, wherein:
    所述旋转元素为旋转线;The rotation element is a rotation line;
    所述根据所述旋转元素和所述旋转中心的位置信息计算所述旋转元素的吸附区域,包括:The calculating the adsorption area of the rotating element according to the position information of the rotating element and the rotation center includes:
    根据所述旋转线的位置信息获取所述旋转线的两个端点的位置信息;Acquiring position information of two endpoints of the rotation line according to the position information of the rotation line;
    根据所述两个端点的位置信息和所述旋转中心的位置信息计算所述两个端 点分别与所述旋转中心的距离;Calculating distances between the two end points and the rotation center according to the position information of the two end points and the position information of the rotation center;
    根据所述两个端点分别与所述旋转中心的距离确定所述旋转线的旋转圆环;Determining a rotation circle of the rotation line according to the distance between the two endpoints and the rotation center;
    根据所述旋转圆环获取所述旋转线的吸附区域。The adsorption area of the rotation line is obtained according to the rotation ring.
  12. 根据权利要求11所述的方法,其中,所述根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素,包括:The method according to claim 11, wherein the selecting an adsorption element of the rotation element from a scene element according to the adsorption region comprises:
    确定所述场景元素中的场景点元素,获取所述场景点元素的位置信息;Determining a scene point element in the scene element, and obtaining position information of the scene point element;
    根据所述场景点元素和所述旋转中心的位置信息计算所述场景点元素与所述旋转中心的距离;Calculating a distance between the scene point element and the rotation center according to the position information of the scene point element and the rotation center;
    根据所述场景点元素与所述旋转中心的距离确定所述吸附区域中的场景点元素;Determining a scene point element in the adsorption area according to a distance between the scene point element and the rotation center;
    从所述吸附区域中的场景点元素中选择所述旋转点的吸附元素。The adsorption element of the rotation point is selected from the scene point elements in the adsorption region.
  13. 根据权利要求11所述的方法,其中,所述根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素,包括:The method according to claim 11, wherein the selecting an adsorption element of the rotation element from a scene element according to the adsorption region comprises:
    确定所述场景元素中的场景线元素;获取所述场景线元素的位置信息;Determining a scene line element in the scene element; obtaining position information of the scene line element;
    根据所述场景线元素的位置信息获取所述场景线元素与所述吸附区域的相交元素;Obtaining intersecting elements of the scene line element and the adsorption area according to the position information of the scene line element;
    从所述相交元素中选择所述旋转线的吸附元素。The adsorbed element of the rotating line is selected from the intersecting elements.
  14. 一种旋转吸附方法,包括:A rotary adsorption method includes:
    根据如权利要求1至13任一项所述的方法选择旋转元素的吸附元素;Selecting the adsorption element of the rotating element according to the method of any one of claims 1 to 13;
    将所述旋转元素旋转吸附至所述吸附元素。The rotating element is rotationally adsorbed to the adsorbing element.
  15. 一种旋转元素的吸附元素选择装置,其中,包括:An adsorption element selection device for rotating elements, including:
    旋转元素选取模块,设置为选取旋转元素并确定所述旋转元素的旋转中心;A rotation element selection module, configured to select a rotation element and determine a rotation center of the rotation element;
    位置信息获取模块,设置为获取所述旋转元素和所述旋转中心的位置信息;A position information acquisition module, configured to acquire position information of the rotation element and the rotation center;
    吸附区域计算模块,设置为根据所述旋转元素和所述旋转中心的位置信息计算所述旋转元素的吸附区域;An adsorption area calculation module configured to calculate an adsorption area of the rotation element according to the position information of the rotation element and the rotation center;
    吸附元素选择模块,设置为根据所述吸附区域从场景元素中选择所述旋转元素的吸附元素。The adsorption element selection module is configured to select an adsorption element of the rotating element from a scene element according to the adsorption region.
  16. 根据权利要求15所述的装置,其中,所述吸附元素选择模块包括:The apparatus according to claim 15, wherein the adsorption element selection module comprises:
    元素设置单元,设置为将所述吸附区域中的场景元素设为备选元素;An element setting unit configured to set a scene element in the adsorption area as a candidate element;
    方向确定单元,设置为确定所述旋转元素的旋转方向;A direction determining unit configured to determine a rotation direction of the rotation element;
    第一选取单元,设置为根据所述旋转方向从所述备选元素中选取所述吸附元素。A first selection unit is configured to select the adsorption element from the candidate elements according to the rotation direction.
  17. 根据权利要求16所述的装置,其中,所述第一选取单元包括:The apparatus according to claim 16, wherein the first selecting unit comprises:
    角度确定单元,设置为根据所述旋转元素的旋转方向确定所述备选元素与所述旋转元素的旋转角度;An angle determining unit configured to determine a rotation angle of the candidate element and the rotation element according to a rotation direction of the rotation element;
    第二选取单元,设置为根据所述旋转角度在所述备选元素中选取所述吸附元素。A second selection unit is configured to select the adsorption element among the candidate elements according to the rotation angle.
  18. 根据权利要求17所述的装置,其中,所述元素选择单元包括:The apparatus according to claim 17, wherein the element selection unit comprises:
    阈值比较单元,设置为将所述旋转角度与设定的吸附角度阈值进行比较;A threshold value comparison unit, configured to compare the rotation angle with a set suction angle threshold value;
    第三选取单元,设置为响应于所述旋转角度小于吸附角度阈值,从所述备选元素中选择所述吸附元素。A third selection unit is configured to select the adsorption element from the candidate elements in response to the rotation angle being smaller than a threshold of the adsorption angle.
  19. 根据权利要求15所述的旋转元素的吸附元素选择装置,其中,所述吸附区域计算模块包括:The device for selecting an adsorption element of a rotating element according to claim 15, wherein the adsorption region calculation module comprises:
    路径计算单元,设置为根据所述旋转元素和所述旋转中心的位置信息计算所述旋转元素的旋转路径;A path calculation unit configured to calculate a rotation path of the rotation element according to position information of the rotation element and the rotation center;
    区域确定单元,设置为根据所述旋转路径确定所述旋转元素的吸附区域。The region determining unit is configured to determine an adsorption region of the rotation element according to the rotation path.
  20. 根据权利要求19所述的装置,其中,所述区域确定单元包括:The apparatus according to claim 19, wherein the area determination unit comprises:
    误差获取单元,设置为获取设定的路径误差值;An error obtaining unit configured to obtain a set path error value;
    区域设置单元,设置为根据所述路径误差值和旋转路径设置所述旋转元素的吸附区域。The region setting unit is configured to set an adsorption region of the rotation element according to the path error value and the rotation path.
  21. 一种旋转吸附装置,其中,包括:A rotary adsorption device, including:
    元素确定模块,设置为根据如权利要求1至13任一项所述的方法选择旋转元素的吸附元素;An element determination module configured to select an adsorption element for a rotation element according to the method according to any one of claims 1 to 13;
    元素吸附模块,设置为将所述旋转元素旋转吸附至所述吸附元素。The element adsorption module is configured to rotationally adsorb the rotating element to the adsorbed element.
  22. 一种交互智能平板,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现权利要求1至14任一项所述的方法。An interactive smart tablet includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, any one of claims 1 to 14 is implemented The method of one item.
  23. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至14任一项所述的方法。A computer-readable storage medium stores a computer program on the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
PCT/CN2019/099799 2018-08-20 2019-08-08 Method and apparatus for selecting absorption element of rotation element, and rotary absorption method and apparatus WO2020038237A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810948443.1A CN109240561B (en) 2018-08-20 2018-08-20 Method and device for selecting rotary element adsorption element, and rotary adsorption method
CN201810948443.1 2018-08-20

Publications (1)

Publication Number Publication Date
WO2020038237A1 true WO2020038237A1 (en) 2020-02-27

Family

ID=65071545

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/099799 WO2020038237A1 (en) 2018-08-20 2019-08-08 Method and apparatus for selecting absorption element of rotation element, and rotary absorption method and apparatus

Country Status (2)

Country Link
CN (1) CN109240561B (en)
WO (1) WO2020038237A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240561B (en) * 2018-08-20 2021-01-08 广州视源电子科技股份有限公司 Method and device for selecting rotary element adsorption element, and rotary adsorption method
CN111352545A (en) * 2019-05-07 2020-06-30 鸿合科技股份有限公司 Automatic adsorption method of interactive service and related equipment
CN113129650B (en) * 2019-12-30 2023-05-23 福建天泉教育科技有限公司 Operation method and terminal based on electronic triangle

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724440A (en) * 2011-05-11 2012-10-10 新奥特(北京)视频技术有限公司 Method for realizing object rotation operation in three dimensional scene
CN103198192A (en) * 2013-04-12 2013-07-10 厦门大学 Snapping method for virtually and quickly assembling three-dimensional components
CN104777998A (en) * 2015-03-17 2015-07-15 惠州Tcl移动通信有限公司 Picture rotating method and intelligent terminal
WO2017002483A1 (en) * 2015-07-01 2017-01-05 株式会社Live2D Program, information processing device, depth definition method, and recording medium
CN109240561A (en) * 2018-08-20 2019-01-18 广州视源电子科技股份有限公司 Rotate the absorbing elements selection method and device, Rotary adsorption method of element

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662574A (en) * 2012-03-28 2012-09-12 广东欧珀移动通信有限公司 Unlocking method of mobile phone touch screen
CN103399696B (en) * 2013-08-16 2018-10-09 上海合合信息科技发展有限公司 The method and device of straight line/line segment absorption, constructs the method and device of polygon
CN103530035A (en) * 2013-10-09 2014-01-22 深圳市中兴移动通信有限公司 Touch control terminal and area operating method of touch control terminal
CN103761027B (en) * 2014-01-29 2016-08-17 广州市久邦数码科技有限公司 The realization method and system that a kind of icon rotates
CN103793141B (en) * 2014-02-11 2016-11-09 久邦计算机技术(广州)有限公司 A kind of realization method and system controlling icon rotation
CN104932669B (en) * 2014-03-20 2018-02-27 联想(北京)有限公司 A kind of pointer rotating device, electronic equipment, information processing method and device
CN104615441A (en) * 2015-02-13 2015-05-13 广州市久邦数码科技有限公司 Desktop system for user-defined desktop element
CN106293314B (en) * 2015-05-30 2020-07-14 腾讯科技(深圳)有限公司 Display control method, device and terminal
CN106126036A (en) * 2016-06-30 2016-11-16 北京奇虎科技有限公司 The batch processing method of a kind of icon, device and mobile terminal
CN107734183A (en) * 2017-10-31 2018-02-23 惠州Tcl移动通信有限公司 A kind of method, storage medium and the mobile terminal of one-handed performance mobile terminal
CN112698781B (en) * 2017-11-03 2022-06-07 腾讯科技(深圳)有限公司 Target positioning method, device, medium and electronic equipment in virtual environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724440A (en) * 2011-05-11 2012-10-10 新奥特(北京)视频技术有限公司 Method for realizing object rotation operation in three dimensional scene
CN103198192A (en) * 2013-04-12 2013-07-10 厦门大学 Snapping method for virtually and quickly assembling three-dimensional components
CN104777998A (en) * 2015-03-17 2015-07-15 惠州Tcl移动通信有限公司 Picture rotating method and intelligent terminal
WO2017002483A1 (en) * 2015-07-01 2017-01-05 株式会社Live2D Program, information processing device, depth definition method, and recording medium
CN109240561A (en) * 2018-08-20 2019-01-18 广州视源电子科技股份有限公司 Rotate the absorbing elements selection method and device, Rotary adsorption method of element

Also Published As

Publication number Publication date
CN109240561B (en) 2021-01-08
CN109240561A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
WO2020038237A1 (en) Method and apparatus for selecting absorption element of rotation element, and rotary absorption method and apparatus
US11165959B2 (en) Connecting and using building data acquired from mobile devices
WO2020253370A1 (en) Association graph presentation method and apparatus, computer device and storage medium
US8683332B2 (en) Distance filtering gesture touchscreen
WO2021098832A1 (en) Element control method, device, apparatus, and storage medium
US20160092080A1 (en) Touch interface for precise rotation of an object
US8312387B2 (en) Target element zoom
WO2021244367A1 (en) Graph drawing method, electronic device and computer storage medium
AU2019457052B2 (en) Table processing method and apparatus, and intelligent interactive tablet and storage medium
WO2019105191A1 (en) Multi-element interaction method, apparatus and device, and storage medium
EP4116814A1 (en) Touch data processing method and apparatus, and device and storage medium
US10606360B2 (en) Three-dimensional tilt and pan navigation using a single gesture
WO2021068381A1 (en) Interface display method, device and apparatus, and storage medium
CN109191547A (en) element adsorption method, device, equipment and storage medium
WO2020200255A1 (en) Erase control processing method, apparatus, and device
CN109032190A (en) Holder rotating direction control method, device, electronic equipment and storage medium
WO2017113665A1 (en) Display region adjusting method and device
WO2022073412A1 (en) Touch screen display frame adjustment method and apparatus, touch screen device, and storage medium
WO2019218622A1 (en) Element control method, apparatus, and device, and storage medium
WO2016145827A1 (en) Terminal control method and device
US9601086B1 (en) Defining a projector display region
CA3069813A1 (en) Capturing, connecting and using building interior data from mobile devices
WO2020119052A1 (en) Image rotation control method and apparatus, image rotation display method and system, and medium
CN110297574B (en) User interface operation method and device
CN109683729A (en) Three-dimensional scenic control method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19852147

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19852147

Country of ref document: EP

Kind code of ref document: A1