Adaptive method, device, medium and computer program product of operating element

In the three-dimensional model production technology, adaptive adjustment is made according to the distance between the operating part and the viewport border, the problem of the operating part exceeding the viewport range is solved, and the interaction convenience and user experience are improved.

CN114359528BActive Publication Date: 2025-05-09LILITH TECH (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210011998.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-06
Publication Date
2025-05-09
Estimated Expiration
2042-01-06

AI Technical Summary

Technical Problem

In three-dimensional model production technology, the operating part is prone to exceed the viewport range when approaching the viewport border, making it difficult for the user to continue interacting with scene elements.

Method used

By determining the distance between the operating member and the viewport border, when the distance is less than or equal to the preset value, the size of the operating member or the relative position between the viewport and the virtual world is adjusted so that the operating member is always within the viewport range.

Benefits of technology

The operation part is adaptively adjusted before approaching the viewport frame, avoiding it exceeding the viewport range, and improving the user's interaction convenience and user experience with scene elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359528B_ABST
    Figure CN114359528B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of three-dimensional model making, and in particular to an adaptive method, device, computer-readable storage medium and computer program product of an operating element. The operating element is configured to interact with scene elements in a virtual world within a viewport range, and the method of the present invention comprises: a determination step of determining the distance between the operating element and the border of the viewport; an adjustment step of adjusting the size of the operating element within the size constraint range of the operating element, and / or adjusting the relative position between the viewport and the virtual world when the distance is less than or equal to a preset value, so that the adjusted operating element is always within the viewport range. The present invention can use the distance between the operating element and the border of the viewport to quantify the proximity of the operating element to the viewport border, and can achieve adaptive adjustment of the operating element before at least a portion of the operating element exceeds the viewport range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional model making, and in particular to an adaptive method and device for an operating part, a computer-readable storage medium and a computer program product. Background Art

[0002] The user can interact with the scene elements in the virtual world within the viewport range through the operating element. However, when the scene element approaches the border of the viewport, at least a part of the operating element will exceed the viewport range, and the user will find it difficult to continue to interact with the scene element. Therefore, it is urgent to improve the convenience of interaction between the user and the scene element and optimize the user experience. Summary of the invention

[0003] The object of the present invention is to provide an adaptive method, device, computer-readable storage medium and computer program product for an operating element, which can use the distance between the operating element and the border of the viewport to quantify the proximity of the operating element to the viewport border, and can realize adaptive adjustment of the operating element before at least a part of the operating element exceeds the viewport range.

[0004] The present invention discloses an adaptive method of an operating element, which is used in an electronic device, wherein the operating element is configured to interact with scene elements in a virtual world within a viewport range, and the method comprises:

[0005] A determination step, determining a distance between the operating element and a frame of the viewport;

[0006] An adjustment step, when the distance is less than or equal to a preset value, adjusting the size of the operating element within the size constraint range of the operating element, and / or adjusting the relative position between the viewport and the virtual world, so that the adjusted operating element is always within the viewport range.

[0007] Optionally, the operating element includes an origin and one or more operating handles extending from the origin in one or more directions and having corresponding lengths, the origin of the operating element is configured to be fixed to a reference point of the scene element that interacts with the operating element, and the one or more operating handles of the operating element are configured to perform any one or more interactive operations of scaling, moving, and rotating on the scene element that interacts with the operating element in the corresponding direction.

[0008] Optionally, the one or more operating handles of the operating member have a corresponding minimum length, and the size constraint of the operating member is defined by the corresponding minimum length of the one or more operating handles of the operating member.

[0009] Optionally, the determining step includes:

[0010] Determining the viewport coordinates of corresponding vertices of the one or more operating handles of the operating member;

[0011] The minimum distance between corresponding vertices of the one or more operating handles of the operating element and the border of the viewport is calculated.

[0012] Optionally, determining the viewport coordinates of corresponding vertices of the one or more operating handles of the operating member in the determining step includes:

[0013] Determining the world coordinates of the reference point of the scene element interacting with the operating member;

[0014] Determining the world coordinates of the origin of the operating element based on the world coordinates of the reference point of the scene element;

[0015] Converting the world coordinates of the origin of the operating element into viewport coordinates of the origin of the operating element;

[0016] Based on the viewport coordinates of the origin of the operating member and based on the corresponding viewport lengths of the one or more operating handles of the operating member, the viewport coordinates of the corresponding vertices of the one or more operating handles of the operating member are determined.

[0017] Optionally, determining the viewport coordinates of corresponding vertices of the one or more operating handles of the operating member in the determining step includes:

[0018] Determining the world coordinates of the reference point of the scene element interacting with the operating member;

[0019] Determining the world coordinates of the origin of the operating element based on the world coordinates of the reference point of the scene element;

[0020] Based on the world coordinates of the origin of the operating member and based on the corresponding world lengths of the one or more operating handles of the operating member, determining the world coordinates of the corresponding vertices of the one or more operating handles of the operating member;

[0021] The world coordinates of the corresponding vertices of the one or more operating handles of the operating element are converted into the viewport coordinates of the corresponding vertices of the one or more operating handles of the operating element.

[0022] Optionally, in the adjusting step, when the distance is less than or equal to a preset value, adjusting the size of the operating member within the size constraint range of the operating member comprises: for an operating handle of the operating member whose minimum distance between a corresponding vertex and a border of the viewport is less than or equal to a preset value, adjusting a corresponding length of the operating handle, so that corresponding vertices of the one or more operating handles of the operating member after adjustment are all within the viewport range; or

[0023] When the distance is less than or equal to a preset value in the adjusting step, adjusting the relative position between the viewport and the virtual world comprises: for an operating handle of an operating member whose minimum distance between a corresponding vertex and a border of the viewport is less than or equal to a preset value, adjusting the relative position between the viewport and the virtual world so that the corresponding vertices of the one or more operating handles of the operating member after adjustment are all within the range of the viewport; or

[0024] In the adjustment step, when the distance is less than or equal to a preset value, adjusting the size of the operating member within the size constraint range of the operating member, and adjusting the relative position between the viewport and the virtual world includes: for an operating handle of the operating member whose minimum distance between a corresponding vertex and a border of the viewport is less than or equal to a preset value, adjusting the corresponding length of the operating handle, if the operating handle is adjusted to the corresponding minimum length of the operating handle and the minimum distance between the corresponding vertices of the adjusted operating handle and the border of the viewport is still less than or equal to the preset value, adjusting the relative position between the viewport and the virtual world so that the corresponding vertices of the one or more operating handles of the operating member after adjustment are all within the range of the viewport.

[0025] The present invention discloses an adaptive system of an operating element, wherein the operating element is configured to interact with scene elements in a virtual world within a viewport range, and the system comprises:

[0026] a determining unit configured to determine a distance between the operating element and a border of the viewport;

[0027] The adjustment unit is configured to adjust the size of the operating element within the size constraint range of the operating element and / or adjust the relative position between the viewport and the virtual world when the distance is less than or equal to a preset value, so that the adjusted operating element is always within the viewport range.

[0028] The present invention discloses an electronic device, which comprises a processor and a memory storing computer executable instructions, wherein the processor is configured to execute the instructions to implement an adaptive method of an operating element.

[0029] The invention discloses a computer-readable storage medium, on which computer-executable instructions are stored. The instructions are executed by a processor to implement an adaptive method of an operating element.

[0030] The invention discloses a computer program product, comprising computer executable instructions, wherein the instructions are executed by a processor to implement an adaptive method of an operating element.

[0031] Compared with the prior art, the main differences and effects of the embodiments of the present invention are:

[0032] By determining the distance between the operating element and the border of the viewport, the present invention can use the distance between the operating element and the border of the viewport to quantify the proximity of the operating element to the viewport border, and by adjusting the size of the operating element within the size constraint of the operating element when the distance is less than or equal to a preset value, and / or adjusting the relative position between the viewport and the virtual world so that the adjusted operating element is always within the viewport range, the present invention can achieve adaptive adjustment of the operating element before at least a portion of the operating element exceeds the viewport range. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of the interaction between the operating parts and the scene elements according to the comparison scale;

[0034] Figure 2A-2C is a schematic diagram of the self-adaptation of the operating member according to an embodiment of the present invention;

[0035] Figure 3 is a flow chart of an adaptive method of an operating element according to an embodiment of the present invention;

[0036] Figure 4 is a structural diagram of an adaptive system of an operating element according to an embodiment of the present invention;

[0037] Figure 5 4 is a hardware structure block diagram of an electronic device that implements the adaptive method of an operating element according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose and technical solution of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] To facilitate understanding of the technical solution of the present application, the definition, structure and application scenarios of the operating element are first introduced.

[0040] When viewing and editing a virtual world, users (e.g., developers, end users, etc.) may need to interact with scene elements in the virtual world, such as scaling, moving, or rotating specific scene elements. The virtual world and its scene elements are displayed to the user via the display of the electronic device, and the user can see at least a portion of the virtual world and its scene elements within the viewport range of the display. The electronic device can be a computer, tablet computer, mobile phone, or other device with data processing and storage functions. The viewport refers to the interactive interface provided to the user by the application software when the scene elements in the virtual world are interactively operated through the application software, and the viewport range is the range corresponding to the interactive interface, and the user can interact with the scene elements within the viewport range. The viewport range can be the entire display area of ​​the display, or it can be a partial display area of ​​the display.

[0041] The virtual world has a world coordinate system (also known as a global coordinate system). The viewport has a viewport coordinate system. The viewport coordinates are standardized display screen coordinates. The viewport coordinates are represented by numbers between 0 and 1, for example, and the viewport range is, for example, a rectangle, with the viewport coordinates of the lower left corner (0,0), the viewport coordinates of the upper left corner (0,1), the viewport coordinates of the lower right corner (1,0), and the viewport coordinates of the upper right corner (1,1). Coordinate conversion can be performed between the world coordinate system and the viewport coordinate system. In general application scenarios, the range of the virtual world is larger than the viewport range, so the viewport only displays a part of the virtual world, and the user can only interact with the part of the virtual world displayed through the viewport.

[0042] The user can interact with the scene elements in the virtual world within the viewport range via the operating member. The operating member includes an origin and one or more operating handles extending from the origin in one or more directions and having corresponding lengths. One or more directions can be configured to be parallel to corresponding coordinate axes of the world coordinate system, respectively. The corresponding lengths of each operating handle can be the same or different. The origin of the operating member is configured to be fixed to a reference point of the scene element interacting with the operating member, the reference point of the scene element can be the center point of the scene element or other arbitrary point, and the one or more operating handles of the operating member are configured to perform any one or more interactive operations of scaling, moving, and rotating the scene element interacting with the operating member in the corresponding direction.

[0043] Figure 1 It is a schematic diagram of how proportional operating parts interact with scene elements.

[0044] like Figure 1As shown, the viewport 100 includes four frames 101A-101D, thereby enclosing and forming a viewport range, and at least a portion of the virtual world and its scene elements 200 are displayed in the viewport. The user interacts with the scene elements 200 in the virtual world within the viewport range via the operating member 300. The operating member 300 includes an origin 301 and two operating handles 302-303 extending from the origin 301 in two directions. The origin 301 is fixed to a reference point (not shown) of the scene element 200. The operating handle 302 has a corresponding length L1 and a corresponding vertex P1, and the operating handle 303 has a corresponding length L2 and a corresponding vertex P2. The user needs to control the operating handles 302-303 to implement interactive operations such as scaling, moving, and rotating the scene element 200.

[0045] When the scene element 200 is close to one or more frames of the viewport 100, for example, when the distance between the scene element 200 and the frame 101A is small, the scene element 200 may be further scaled, moved or rotated by the operating member 300, and at least a portion of the operating member 300 may exceed the range of the viewport. Specifically, any of the above-mentioned scaling, moving and rotating operations may cause at least a portion of the operating member 300 to exceed the range of the viewport, or a combination of any two of the scaling, moving and rotating operations or a combination of the three may cause at least a portion of the operating member 300 to exceed the range of the viewport. For example, the operating handle 302 of the operating member 300 exceeds the range of the viewport, and at this time, the user cannot see the vertex P1 of the operating handle 302, and it will be difficult to continue to scale, move or rotate the scene element 200 in the corresponding direction of the operating handle 302.

[0046] In the comparison example described above, the user needs to manually move the viewport, that is, modify the relative position relationship between the world coordinate system and the viewport coordinate system, so that the operating member 300 reappears completely within the viewport range. In this way, the user can continue to interact with the scene element 200 in the corresponding direction of the operating handle 302.

[0047] Figure 2A-2C 4 is a schematic diagram of the self-adaptation of the operating member according to an embodiment of the present invention.

[0048] like Figure 2A As shown, when the operating member 300 is close to one or more borders of the viewport 100, for example, when the distance between the corresponding vertex P1 of the operating handle 302 of the operating member 300 and the border 101A is small, if the scene element continues to be moved upward via the operating handle 302, the vertex P1 of the operating handle 302 will be moved out of the viewport. At this time, the corresponding length of the operating handle 302 can be adjusted to shorten it to L1', so that the corresponding vertices P1-P2 of the two operating handles 302-303 of the adjusted operating member 300 are all within the viewport range.

[0049] like Figure 2BAs shown, when the operating member 300 is close to one or more borders of the viewport 100, for example, when the distance between the corresponding vertex P1 of the operating handle 302 of the operating member 300 and the border 101A is small, if the scene element continues to be moved upward via the operating handle 302, the vertex P1 of the operating handle 302 will be moved out of the viewport. At this time, the relative position between the viewport 100 and the virtual world can be adjusted so that the corresponding vertices P1-P2 of the two operating handles 302-303 of the adjusted operating member 300 are within the viewport range. In the present invention, adjusting the relative position between the viewport and the virtual world means that when the operating element approaches the border of the viewport, if the scene elements are controlled by the operating element to continue to move toward the border of the viewport, the operating element and the controlled scene elements are stationary relative to the viewport, but the operating element, the controlled scene elements and the viewport move together relative to the virtual world. It can also be said that the operating element, the controlled scene elements and the viewport move together in the virtual world. From the user's perspective, the operating element, the controlled scene elements and the viewport are relatively stationary, while other scene elements in the virtual world move in another direction.

[0050] like Figure 2C As shown, when the operating member 300 is close to one or more borders of the viewport 100, for example, when the distance between the corresponding vertex P1 of the operating handle 302 of the operating member 300 and the border 101A is small, if the scene element continues to be moved upward via the operating handle 302, the vertex P1 of the operating handle 302 will be moved out of the viewport. At this time, the corresponding length of the operating handle 302 can be adjusted first until it is adjusted to the corresponding minimum length L1min. If the distance between the corresponding vertex P1 of the adjusted operating handle 302 and the border 101A is still less than or equal to the preset value at this time, the relative position between the viewport 100 and the virtual world is continued to be adjusted so that the corresponding vertices P1-P2 of the two operating handles 302-303 of the adjusted operating member 300 are all within the viewport range.

[0051] In the three embodiments described above, even when the scene element 200 is close to one or more borders of the viewport 100, at least a portion of the operating member 300 will not exceed the viewport range, and the operating member 300 can always be within the viewport range, thereby improving the convenience of interaction between the user and the scene element and optimizing the user's experience. Although the above embodiments only describe the situation of moving the scene element via the operating member, those skilled in the art can easily know from the above embodiments that when the scene element is scaled or rotated via the operating member, the technical solution provided by the present invention can also be used to achieve the technical effect of the operating member always being within the viewport range.

[0052] Figure 3 FIG. 1 is a flow chart of an adaptive method of an operating element according to an embodiment of the present invention. Figure 3As shown, the first embodiment includes:

[0053] In step S301, the distance between the operating element and the border of the viewport is determined.

[0054] Optionally, determining the distance between the operating element and the border of the viewport includes determining the viewport coordinates of corresponding vertices of one or more operating handles of the operating element, and calculating the minimum distance between the corresponding vertices of the one or more operating handles of the operating element and the border of the viewport.

[0055] It can be understood that when the operating member is of the structure described above, the corresponding vertices of the various operating handles of the operating member will belong to the peripheral part of the operating member. Once the corresponding vertex of a certain operating handle of the operating member approaches a certain border of the viewport, the operating member is close to the border of the viewport. Therefore, the minimum distance between the corresponding vertices of one or more operating handles of the operating member and the border of the viewport can be used as the distance between the operating member and the border of the viewport. The distance here can be understood as the vertical distance from a point (i.e., the vertex of the operating handle) to a straight line (i.e., the border of the viewport) on a two-dimensional plane (i.e., the plane where the viewport is located).

[0056] For example, the viewport coordinates of the corresponding vertices P1-P2 of the two operating handles 302-303 of the operating member 300 are determined, and based on the viewport coordinates, the distances between the corresponding vertices P1-P2 and the four borders 101A-101D of the viewport 100 are calculated in the viewport coordinate system, and the minimum distance among these distances is selected as the distance between the operating member 300 and the border of the viewport 100.

[0057] Optionally, determining the viewport coordinates of corresponding vertices of one or more operating handles of the operating element includes determining the world coordinates of a reference point of a scene element that interacts with the operating element, determining the world coordinates of the origin of the operating element based on the world coordinates of the reference point of the scene element, converting the world coordinates of the origin of the operating element into viewport coordinates of the origin of the operating element, and determining the viewport coordinates of corresponding vertices of one or more operating handles of the operating element based on the viewport coordinates of the origin of the operating element and based on the corresponding viewport lengths of the one or more operating handles of the operating element.

[0058] It is understandable that the origin of the operating member is configured to be fixed to the reference point of the scene element that interacts with the operating member, so the world coordinates of the origin can be determined by the world coordinates of the reference point, and the viewport coordinates of the origin can be determined by the coordinate conversion between the world coordinate system and the viewport coordinate system. The operating handle can be added to the viewport in a step after the rendering process, so it can be considered as a post-processing effect. In this case, the corresponding lengths of the various operating handles of the operating member in the viewport (i.e., the viewport length) are fixed, so the viewport coordinates of the corresponding vertices of each operating handle can be determined by the viewport coordinates of the origin and the corresponding viewport lengths of each operating handle.

[0059] Optionally, determining the viewport coordinates of corresponding vertices of one or more operating handles of the operating element includes determining the world coordinates of a reference point of a scene element that interacts with the operating element, determining the world coordinates of the origin of the operating element based on the world coordinates of the reference point of the scene element, determining the world coordinates of corresponding vertices of one or more operating handles of the operating element based on the world coordinates of the origin of the operating element and based on the corresponding world lengths of one or more operating handles of the operating element, and converting the world coordinates of the corresponding vertices of one or more operating handles of the operating element into viewport coordinates of the corresponding vertices of one or more operating handles of the operating element.

[0060] It is understandable that the origin of the operating member is configured to be fixed to the reference point of the scene element that interacts with the operating member, so the world coordinates of the origin can be determined by the world coordinates of the reference point. The operating handle can be directly bound to the scene element in the virtual world and displayed to the user through the rendering process. In this case, since the scene element changes in the virtual world with the three-dimensional display effect of near large and far small when observed from the viewport (the viewport can be understood as a virtual camera corresponding to shooting the virtual world), the length of the operating handle observed from the viewport remains unchanged (when the operating handle is not close to the border of the viewport and adaptively adjusted), so the corresponding length of the operating handle in the virtual world (that is, the world length, which can also be understood as the distance between the world coordinates of the origin of the operating handle and the vertex of the operating handle) changes with the distance between the scene element and the virtual camera, so that the world coordinates of the corresponding vertices of each operating handle can be determined by the world coordinates of the origin and the corresponding world lengths of each operating handle, and the viewport coordinates of the corresponding vertices of each operating handle are determined by the coordinate conversion between the world coordinate system and the viewport coordinate system.

[0061] Through step S301, the present invention can use the distance between the operating element and the frame of the viewport to quantify the proximity between the operating element and the frame of the viewport.

[0062] In step S302, when the distance is less than or equal to the preset value, the size of the operating element is adjusted within the size constraint range of the operating element, and / or the relative position between the viewport and the virtual world is adjusted, so that the adjusted operating element is always within the viewport range. The preset value can be set to 0, that is, when the vertex of the operating element reaches the border of the viewport, if the operating element continues to move, adaptive adjustment is performed.

[0063] Optionally, one or more operating handles of the operating member have a corresponding minimum length, and the size constraint of the operating member is defined by the corresponding minimum length of the one or more operating handles of the operating member.

[0064] It is understandable that the corresponding minimum length of each operating handle can indicate the visible or operable range of the operating handle. When the corresponding length of a certain operating handle is less than the corresponding minimum length, since the operating handle is too short, it will be difficult for the user to see the corresponding direction of the operating handle or to select the operating handle, thereby making it difficult to scale, move and / or rotate the corresponding scene element in the corresponding direction of the operating handle. Therefore, the size adjustment of the operating member should be performed within the size constraint range of the operating member. The corresponding minimum length of each operating handle can be preset or actively set by the user, and the corresponding minimum length of each operating handle can be the same or different.

[0065] Optionally, for an operating handle of an operating member whose minimum distance between a corresponding vertex and the border of the viewport is less than or equal to a preset value, the corresponding length of the operating handle is adjusted so that the corresponding vertices of one or more operating handles of the adjusted operating member are within the viewport range.

[0066] Return to Figure 2A , the minimum distance between the corresponding vertex P1 of the operating handle 302 and the four borders 101A-101D of the viewport 100 (i.e., the distance between the corresponding vertex P1 and the border 101A) is less than or equal to the preset value, and the corresponding length of the operating handle 302 is adjusted. From the user's perspective, the corresponding length of the operating handle 302 is shortened from L1 to L1', so that the corresponding vertex P1 of the operating handle 302 of the adjusted operating member 300 is within the viewport range, and the corresponding vertex P2 of the operating handle 303 is also within the viewport range.

[0067] Optionally, for an operating member's operating handle whose minimum distance between a corresponding vertex and the border of the viewport is less than or equal to a preset value, the relative position between the viewport and the virtual world is adjusted so that the corresponding vertices of one or more operating handles of the adjusted operating member are within the viewport range.

[0068] Return to Figure 2B, the minimum distance between the corresponding vertex P1 of the operating handle 302 and the four borders 101A-101D of the viewport 100 (i.e., the distance between the corresponding vertex P1 and the border 101A) is less than or equal to the preset value, then the relative position between the viewport 100 and the virtual world is adjusted, and from the user's perspective, the viewport camera moves in the virtual world so that the corresponding vertex P1 of the operating handle 302 of the adjusted operating member 300 is within the viewport range, and the corresponding vertex P2 of the operating handle 303 is also within the viewport range.

[0069] Optionally, for an operating handle of an operating member whose minimum distance between a corresponding vertex and the border of the viewport is less than or equal to a preset value, the corresponding length of the operating handle is adjusted; if the operating handle is adjusted to the corresponding minimum length of the operating handle and the minimum distance between the corresponding vertex of the adjusted operating handle and the border of the viewport is still less than or equal to the preset value, the relative position between the viewport and the virtual world is adjusted so that the corresponding vertices of one or more operating handles of the adjusted operating member are within the range of the viewport.

[0070] Return to Figure 2C , the minimum distance between the corresponding vertex P1 of the operating handle 302 and the four borders 101A-101D of the viewport 100 (i.e., the distance between the corresponding vertex P1 and the border 101A) is less than or equal to the preset value. At this time, the corresponding length of the operating handle 302 is first adjusted. From the user's perspective, the corresponding length of the operating handle 302 is shortened from L1 to L1min. However, the distance between the corresponding vertex P1 of the operating handle 302 and the border 101A after adjustment is still less than or equal to the preset value. Therefore, the relative position between the viewport 100 and the virtual world continues to be adjusted. From the user's perspective, the viewport moves in the virtual world, so that the corresponding vertex P1 of the operating handle 302 of the adjusted operating member 300 is within the viewport range, and the corresponding vertex P2 of the operating handle 303 is also within the viewport range.

[0071] Through step S302, the present invention can realize adaptive adjustment of the operating element before at least a part of the operating element exceeds the range of the viewport.

[0072] Figure 4 is a structural diagram of an adaptive system of an operating element according to an embodiment of the present invention. Figure 4 As shown, the second embodiment includes:

[0073] The determining unit 401 is configured to determine the distance between the operating element and the border of the viewport.

[0074] Through the determination unit 401, the present invention can use the distance between the operating element and the border of the viewport to quantify the proximity between the operating element and the border of the viewport.

[0075] The adjustment unit 402 is configured to adjust the size of the operating element within the size constraint range of the operating element when the distance is less than or equal to a preset value, and / or adjust the relative position between the viewport and the virtual world so that the adjusted operating element is always within the viewport range.

[0076] Through the adjustment unit 402, the present invention can realize adaptive adjustment of the operating element before at least a part of the operating element exceeds the range of the viewport.

[0077] The first embodiment is a method implementation method corresponding to the present embodiment, and the present embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in the present embodiment, and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in the present embodiment can also be applied in the first embodiment.

[0078] Figure 5 4 is a hardware structure block diagram of an electronic device that implements the adaptive method of an operating element according to an embodiment of the present invention.

[0079] like Figure 5 As shown, the electronic device 500 may include one or more processors 502, a system motherboard 508 connected to at least one of the processors 502, a system memory 504 connected to the system motherboard 508, a non-volatile memory (NVM) 506 connected to the system motherboard 508, and a network interface 510 connected to the system motherboard 508.

[0080] The processor 502 may include one or more single-core or multi-core processors. The processor 502 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In an embodiment of the present invention, the processor 502 may be configured to execute the following operations: Figure 3 One or more of the various embodiments shown.

[0081] In some embodiments, system board 508 may include any suitable interface controller to provide any suitable interface to at least one of processors 502 and / or any suitable device or component in communication with system board 508 .

[0082] In some embodiments, the system board 508 may include one or more memory controllers to provide an interface to the system memory 504. The system memory 504 may be used to load and store data and / or instructions. In some embodiments, the system memory 504 of the electronic device 500 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).

[0083] NVM 506 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM 506 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of a HDD (Hard Disk Drive), a CD (CompactDisc) drive, and a DVD (Digital Versatile Disc) drive.

[0084] NVM 506 may include a portion of storage resources installed on a device of electronic device 500, or it may be accessible by the device but not necessarily a portion of the device. For example, NVM 506 may be accessed over a network via network interface 510.

[0085] In particular, system memory 504 and NVM 506 may include, respectively, a temporary copy and a permanent copy of instructions 520. Instructions 520 may include instructions that, when executed by at least one of processors 502, cause electronic device 500 to implement the following: Figure 3 In some embodiments, instructions 520, hardware, firmware and / or software components thereof may additionally / alternatively be located in system board 508, network interface 510 and / or processor 502.

[0086] The network interface 510 may include a transceiver for providing a radio interface for the electronic device 500, thereby communicating with any other suitable device (e.g., a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 510 may be integrated with other components of the electronic device 500. For example, the network interface 510 may be integrated with at least one of the processor 502, the system memory 504, the NVM 506, and a firmware device (not shown) having instructions. When at least one of the processors 502 executes the instructions, the electronic device 500 implements Figure 3 One or more of the various embodiments shown.

[0087] The network interface 510 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 510 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0088] In one embodiment, at least one of the processors 502 may be packaged together with one or more controllers for the system motherboard 508 to form a system in package (SiP). In one embodiment, at least one of the processors 502 may be integrated on the same die with one or more controllers for the system motherboard 508 to form a system on a chip (SoC).

[0089] The electronic device 500 may further include an input / output (I / O) device 512 connected to the system motherboard 508. The I / O device 512 may include a user interface to enable a user to interact with the electronic device 500; the design of the peripheral component interface enables the peripheral components to interact with the electronic device 500. In some embodiments, the electronic device 500 further includes a sensor for determining at least one of an environmental condition and location information related to the electronic device 500.

[0090] In some embodiments, I / O device 512 may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.

[0091] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.

[0092] In some embodiments, the sensors may include, but are not limited to, gyroscope sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of or interact with the network interface 510 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).

[0093] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0094] Program code can be applied to input instructions to perform the functions described in the present invention and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a system for processing instructions including processor 502 includes any system having a processor such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0095] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in the present invention is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0096] One or more aspects of at least one embodiment may be implemented by instructions stored on a computer-readable storage medium, which, when read and executed by a processor, enables an electronic device to implement the method of the embodiment described in the present invention.

[0097] The present invention also provides a computer-readable storage medium having computer-executable instructions stored thereon, the instructions being executed by a processor to implement the above-described method for adapting the operating element.

[0098] The present invention also provides a computer program product, which includes computer executable instructions, and the instructions are executed by a processor to implement the adaptive method of the operating element described above.

[0099] While the present invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims

1. An adaptive method for an operating element, used in an electronic device, characterized in that: The operating element is configured to interact with scene elements in the virtual world within the viewport range, and the method includes: A determination step, determining a distance between the operating element and a frame of the viewport; an adjusting step, when the distance is less than or equal to a preset value, adjusting the size of the operating element within the size constraint range of the operating element, and / or adjusting the relative position between the viewport and the virtual world, so that the adjusted operating element is always within the viewport range, Wherein, the operating element includes an origin and one or more operating handles extending from the origin along one or more directions and having corresponding lengths, the origin of the operating element is configured to be fixed to a reference point of the scene element that interacts with the operating element, and the one or more operating handles of the operating element are configured to perform any one or more interactive operations of scaling, moving, and rotating on the scene element that interacts with the operating element in the corresponding direction.

2. The method according to claim 1, characterized in that The one or more operating handles of the operating member have respective minimum lengths, and the size constraint of the operating member is defined by the respective minimum lengths of the one or more operating handles of the operating member.

3. The method according to claim 2, characterized in that The determining step comprises: Determining the viewport coordinates of corresponding vertices of the one or more operating handles of the operating member; The minimum distance between corresponding vertices of the one or more operating handles of the operating element and the border of the viewport is calculated.

4. The method according to claim 3, characterized in that Determining the viewport coordinates of the corresponding vertices of the one or more operating handles of the operating member in the determining step includes: Determining the world coordinates of the reference point of the scene element interacting with the operating member; Determining the world coordinates of the origin of the operating element based on the world coordinates of the reference point of the scene element; Converting the world coordinates of the origin of the operating element into viewport coordinates of the origin of the operating element; Based on the viewport coordinates of the origin of the operating member and based on the corresponding viewport lengths of the one or more operating handles of the operating member, the viewport coordinates of the corresponding vertices of the one or more operating handles of the operating member are determined.

5. The method according to claim 3, characterized in that: Determining the viewport coordinates of the corresponding vertices of the one or more operating handles of the operating member in the determining step includes: Determining the world coordinates of the reference point of the scene element interacting with the operating member; Determine the world coordinates of the origin of the operating element based on the world coordinates of the reference point of the scene element; determine the world coordinates of the corresponding vertices of the one or more operating handles of the operating element based on the world coordinates of the origin of the operating element and based on the corresponding world lengths of the one or more operating handles of the operating element; The world coordinates of the corresponding vertices of the one or more operating handles of the operating element are converted into the viewport coordinates of the corresponding vertices of the one or more operating handles of the operating element.

6. The method according to any one of claims 3 to 5, characterized in that: When the distance is less than or equal to a preset value in the adjusting step, adjusting the size of the operating member within the size constraint range of the operating member includes: for an operating handle of the operating member whose minimum distance between a corresponding vertex and the border of the viewport is less than or equal to a preset value, adjusting the corresponding length of the operating handle so that the corresponding vertices of the one or more operating handles of the operating member after adjustment are all within the range of the viewport; or When the distance is less than or equal to a preset value in the adjusting step, adjusting the relative position between the viewport and the virtual world comprises: for an operating handle of an operating member whose minimum distance between a corresponding vertex and a border of the viewport is less than or equal to a preset value, adjusting the relative position between the viewport and the virtual world so that the corresponding vertices of the one or more operating handles of the operating member after adjustment are all within the range of the viewport; or In the adjustment step, when the distance is less than or equal to a preset value, adjusting the size of the operating member within the size constraint range of the operating member, and adjusting the relative position between the viewport and the virtual world includes: for an operating handle of the operating member whose minimum distance between a corresponding vertex and a border of the viewport is less than or equal to a preset value, adjusting the corresponding length of the operating handle, if the operating handle is adjusted to the corresponding minimum length of the operating handle and the minimum distance between the corresponding vertices of the adjusted operating handle and the border of the viewport is still less than or equal to the preset value, adjusting the relative position between the viewport and the virtual world so that the corresponding vertices of the one or more operating handles of the operating member after adjustment are all within the range of the viewport.

7. An electronic device, characterized in that: The electronic device comprises a processor and a memory storing computer executable instructions, wherein the processor is configured to execute the instructions to implement the adaptive method of the operating element according to any one of claims 1 to 6.

8. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that: The instructions are executed by a processor to implement the adaptive method of an operating element according to any one of claims 1 to 6.

9. A computer program product comprising computer executable instructions, characterized in that: The instructions are executed by a processor to implement the adaptive method of an operating element according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dynamic virtual element positioning in an augmented reality environment

    US20210287410A1