CN115373513A - Desktop interaction system, realization method and storage medium - Google Patents
Desktop interaction system, realization method and storage medium Download PDFInfo
- Publication number
- CN115373513A CN115373513A CN202210906137.8A CN202210906137A CN115373513A CN 115373513 A CN115373513 A CN 115373513A CN 202210906137 A CN202210906137 A CN 202210906137A CN 115373513 A CN115373513 A CN 115373513A
- Authority
- CN
- China
- Prior art keywords
- interactive
- pen
- pressing
- variable
- interaction
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/011—Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0354—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
- G06F3/03545—Pens or stylus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/038—Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
- G06F3/0383—Signal control means within the pointing device
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/006—Mixed reality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/01—Indexing scheme relating to G06F3/01
- G06F2203/012—Walk-in-place systems for allowing a user to walk in a virtual environment while constraining him to a given position in the physical environment
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/04—Indexing scheme for image data processing or generation, in general involving 3D image data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2016—Rotation, translation, scaling
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Graphics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Architecture (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本发明涉及数据交互领域,尤其涉及一种桌面交互系统及实现方法、存储介质。The invention relates to the field of data interaction, in particular to a desktop interaction system, an implementation method, and a storage medium.
背景技术Background technique
虚拟现实技术(virtual reality,VR),又称灵境技术,是20世纪发展起来的一项全新的实用技术。虚拟现实技术囊括计算机、电子信息、仿真技术,其基本实现方式是计算机模拟虚拟环境从而给人以环境沉浸感。随着社会生产力和科学技术的不断发展,各行各业对VR技术的需求日益旺盛,VR技术也取得了巨大进步,并逐步成为一个新的科学技术领域。Virtual reality technology (virtual reality, VR), also known as spiritual technology, is a new practical technology developed in the 20th century. Virtual reality technology includes computer, electronic information, and simulation technology. Its basic implementation method is to simulate a virtual environment by computer to give people a sense of environmental immersion. With the continuous development of social productivity and science and technology, all walks of life have increasingly strong demand for VR technology, VR technology has also made great progress, and gradually become a new field of science and technology.
交互笔是实现虚拟场景操控的核心部件,其中交互笔的空间坐标、姿态以及交互笔的笔头指向是实现虚拟场景精确控制的关键数据。如何通过交互笔与交互设备进行交互是一个亟待解决的问题。The interactive pen is the core component to realize the manipulation of the virtual scene, in which the spatial coordinates, posture and pen pointing of the interactive pen are the key data to realize the precise control of the virtual scene. How to interact with the interactive device through the interactive pen is an urgent problem to be solved.
发明内容Contents of the invention
鉴于上述现有技术的不足,本发明的目的在于提供一种桌面交互系统及实现方法、存储介质。该桌面交互系统是一套可以应用在教育教学等多个场合的产品,通过交互笔和交互设备可以让用户操作UE4所开发的内容中的各种静态模型和骨骼模型。In view of the above deficiencies in the prior art, the object of the present invention is to provide a desktop interactive system, an implementation method, and a storage medium. The desktop interactive system is a set of products that can be applied in many occasions such as education and teaching. Through interactive pens and interactive devices, users can operate various static models and skeleton models in the content developed by UE4.
本发明第一方面提供了一种桌面交互系统,该交互系统包括:交互笔,所述交互笔包含至少三个按键,其中,每个所述按键具有按下和松开两种状态,所述按键用于接收用户的按压与及松开操作,并将所述按压与松开操作发送至所交互设备;所述交互设备,用于根据所述按压与所述松开操作对模型进行抓取、旋转、缩放以及返回操作。The first aspect of the present invention provides a desktop interactive system, the interactive system includes: an interactive pen, the interactive pen includes at least three buttons, wherein each of the buttons has two states of pressing and releasing, the The button is used to receive the user's pressing and releasing operations, and send the pressing and releasing operations to the interactive device; the interactive device is used to grasp the model according to the pressing and releasing operations , rotate, scale, and return operations.
可选地,结合第一方面,在一种可能的实现方式中,所述交互笔包括第一按键,所述第一按键用于控制抓取模型;所述交互设备,用于顺着所述交互笔所指的方向做射线检测,并将所述射线检测返回的命中结果存储为第一变量;当所述交互设备从所述交互笔处获取到所述第一按键被按下时,所述交互设备判断所述第一变量是否有效;若所述第一变量有效,则所述交互设备将所述射线检测命中结果对应的模型进行抓取。Optionally, in combination with the first aspect, in a possible implementation manner, the interactive pen includes a first button, and the first button is used to control the grasping model; the interactive device is used to follow the Perform ray detection in the direction pointed by the interactive pen, and store the hit result returned by the ray detection as a first variable; when the interactive device obtains from the interactive pen that the first button is pressed, the The interaction device judges whether the first variable is valid; if the first variable is valid, the interaction device grabs the model corresponding to the ray detection hit result.
可选地,结合第一方面,在一种可能的实现方式中,所述交互设备还用于,当判断所述第一变量无效时,抓取交互框内全部模型。Optionally, in combination with the first aspect, in a possible implementation manner, the interaction device is further configured to, when it is judged that the first variable is invalid, capture all the models in the interaction frame.
可选地,结合第一方面,在一种可能的实现方式中,所述交互笔,还用于当第二按键被按下时,获取自身的旋转角度,并将所述旋转角度发送至所述交互设备;所述交互设备,还用于根据所述旋转角度对所述抓取到的模型进行旋转。Optionally, in combination with the first aspect, in a possible implementation manner, the interactive pen is further configured to obtain its own rotation angle when the second button is pressed, and send the rotation angle to the The interaction device; the interaction device is further configured to rotate the captured model according to the rotation angle.
可选地,结合第一方面,在一种可能的实现方式中,所述交互笔,还用于当第二按键被按下时,获取自身的坐标位置,并获取坐标位置的变化量,其中,所述坐标位置的变化量以第一方向为正方向,以与所述第一方向相反的方向为反方向,并将所述坐标位置的变化量发送至所述交互设备;所述交互设备,还用于将所述坐标位置的变化量映射至所述抓取到的模型的虚拟坐标中,根据所述坐标位置的变化量对所述抓取的模型进行缩放。Optionally, in combination with the first aspect, in a possible implementation manner, the interactive pen is further configured to obtain its own coordinate position and the change amount of the coordinate position when the second button is pressed, wherein , the change amount of the coordinate position takes the first direction as the positive direction, and the direction opposite to the first direction is the reverse direction, and sends the change amount of the coordinate position to the interaction device; the interaction device is further configured to map the variation of the coordinate position to the virtual coordinates of the captured model, and scale the captured model according to the variation of the coordinate position.
可选地,结合第一方面,在一种可能的实现方式中,所述交互笔还包括第三按键,当所述第三按键被单击时,所述交互设备执行返回菜单操作;当所述第三按键被长按时,所述交互设备执行数据校准。Optionally, in combination with the first aspect, in a possible implementation manner, the interactive pen further includes a third button, and when the third button is clicked, the interactive device performs a return menu operation; when the When the third button is long pressed, the interactive device performs data calibration.
本发明第二方面提供了一种桌面交互实现方法,该方法应用于第一方面及第一方面任意一种可能的实现方式中所述的桌面交互系统。所述方法包括:接收用户对于按键的按压与松开操作,并将按压与松开操作发送至交互设备;根据所述按压与松开操作对模型进行抓取、旋转、缩放以及返回操作。The second aspect of the present invention provides a desktop interaction implementation method, which is applied to the desktop interaction system described in the first aspect and any possible implementation manner of the first aspect. The method includes: receiving the pressing and releasing operation of the button by the user, and sending the pressing and releasing operation to the interactive device; performing grabbing, rotating, zooming and returning operations on the model according to the pressing and releasing operation.
结合第二方面,在一种可能的实现方式中,所述交互笔包括第一按键,所述第一按键用于控制抓取模型;顺着所述交互笔所指的方向做射线检测,并将所述射线检测返回的命中结果存储为第一变量;当获取到所述第一按键被按下时,判断所述第一变量是否有效;当所述第一变量有效时,将所述射线检测命中结果对应的模型进行抓取。With reference to the second aspect, in a possible implementation manner, the interactive pen includes a first button, and the first button is used to control the grasping model; perform ray detection along the direction pointed by the interactive pen, and Store the hit result returned by the ray detection as a first variable; when it is acquired that the first key is pressed, judge whether the first variable is valid; when the first variable is valid, set the ray The model corresponding to the detection hit result is grabbed.
结合第二方面,在一种可能的实现方式中,所述方法还包括:当判断所述第一变量无效时,抓取交互框内全部模型。With reference to the second aspect, in a possible implementation manner, the method further includes: when it is judged that the first variable is invalid, capturing all models in the interaction frame.
结合第二方面,在一种可能的实现方式中,所述方法还包括:当第二按键被按下时,所述交互笔获取自身的旋转角度,并将所述旋转角度发送至所述交互设备;所述交互设备根据所述旋转角度对所述抓取到的模型进行旋转。With reference to the second aspect, in a possible implementation manner, the method further includes: when the second key is pressed, the interactive pen obtains its own rotation angle, and sends the rotation angle to the interactive device; the interaction device rotates the captured model according to the rotation angle.
结合第二方面,在一种可能的实现方式中,所述方法还包括:当第二按键被按下时,所述交互笔获取自身的坐标位置,并获取坐标位置的变化量,其中,所述坐标位置的变化量以第一方向为正方向,以与所述第一方向相反的方向为反方向,并将所述坐标位置的变化量发送至所述交互设备;所述交互设备,将所述坐标位置的变化量映射至所述抓取到的模型的虚拟坐标中,根据所述坐标位置的变化量对所述抓取的模型进行缩放。With reference to the second aspect, in a possible implementation manner, the method further includes: when the second button is pressed, the interactive pen obtains its own coordinate position and the change amount of the coordinate position, wherein the The change amount of the coordinate position takes the first direction as the positive direction, and the direction opposite to the first direction is the reverse direction, and sends the change amount of the coordinate position to the interactive device; the interactive device sends The change amount of the coordinate position is mapped to the virtual coordinates of the captured model, and the captured model is scaled according to the change amount of the coordinate position.
本发明第三方面还提供了一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行时,可使得所述一个或多个处理器执行上述桌面交互实现方法。The third aspect of the present invention also provides a non-volatile computer-readable storage medium, which is characterized in that the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are controlled by one or When multiple processors execute, the one or multiple processors can be made to execute the above desktop interaction implementation method.
本发明公开了一种桌面交互系统及实现方法、存储介质,该交互系统包括:交互笔,所述交互笔包含至少三个按键,其中,每个所述按键具有按下和松开两种状态,所述按键用于接收用户的按压与及松开操作,并将所述按压与松开操作发送至所交互设备;所述交互设备,用于根据所述按压与所述松开操作对模型进行抓取、旋转、缩放以及返回操作。这样可以通过交互笔和交互设备实现用户操作UE4所开发的内容中各种静态模型和骨骼模型,能够提高用户体验。The invention discloses a desktop interactive system, its realization method, and a storage medium. The interactive system includes: an interactive pen, and the interactive pen includes at least three buttons, wherein each of the buttons has two states of pressing and releasing , the button is used to receive the user's press and release operations, and send the press and release operations to the interactive device; the interaction device is used to control the model according to the press and release operations Grab, rotate, scale, and return operations. In this way, users can operate various static models and skeleton models in the content developed by UE4 through interactive pens and interactive devices, which can improve user experience.
附图说明Description of drawings
下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with accompanying drawing and embodiment, in the accompanying drawing:
图1为本发明提供的一种交互笔的结构示意图;Fig. 1 is a schematic structural diagram of an interactive pen provided by the present invention;
图2为本发明提供的一种添加IMUPenComponent组件的示意图;Fig. 2 is a schematic diagram of adding an IMUPenComponent component provided by the present invention;
图3为本发明提供的一种IMUPenComponent组件提供的事件示意图;Fig. 3 is a schematic diagram of events provided by an IMUPenComponent component provided by the present invention;
图4为本发明提供的一种桌面交互系统的示意图;Fig. 4 is a schematic diagram of a desktop interactive system provided by the present invention;
图5为本发明提供的一种桌面交互实现方法流程图;FIG. 5 is a flowchart of a method for implementing desktop interaction provided by the present invention;
图6为本发明提供的交互设备的结构示意图。Fig. 6 is a schematic structural diagram of an interactive device provided by the present invention.
具体实施方式Detailed ways
本申请实施例提供了一种地面滤除方法,以及相关设备,旨在通过多次滤除,提高了地面滤除的可靠性。The embodiment of the present application provides a ground filtering method and related equipment, aiming at improving the reliability of ground filtering through multiple filtering.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。在本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a、b和c可以是单个,也可以是多个。值得注意的是,“至少一项(个)”还可以解释成“一项(个)或多项(个)”。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In this application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b or c can represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be It can be single or multiple. It should be noted that "at least one item (item)" can also be interpreted as "one item (item) or multiple items (item)".
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in this application, words such as "exemplary" or "for example" are used as examples, illustrations or illustrations. Any embodiment or design described herein as "exemplary" or "for example" is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
本申请实施例中出现的第一、第二等描述,仅作示意与区分描述对象之用,没有次序之分,也不表示本申请实施例中对设备个数的特别限定,不能构成对本申请实施例的任何限制。The first, second, etc. descriptions that appear in the embodiments of this application are only for illustration and to distinguish the description objects. Any limitations of the examples.
本申请主要是对交互笔与交互设备形成的3D桌面交互系统进行说明,3D桌面交互系统是一套可以应用在教育教学等多种场合产品,通过使用配套的交互笔和其他设备可以让用户操作UE4所开发的内容中的各种静态模型和骨骼模型。为了方便用户的使用以及在此基础上自行开发新的场景,我们基于UE4渲染引擎和交互笔设计并开发了一个基础的交互逻辑框架。This application is mainly to explain the 3D desktop interactive system formed by the interactive pen and interactive equipment. The 3D desktop interactive system is a set of products that can be applied to various occasions such as education and teaching. By using the matching interactive pen and other equipment, users can operate Various static models and skeleton models in the content developed by UE4. In order to facilitate the use of users and develop new scenes on this basis, we designed and developed a basic interactive logic framework based on the UE4 rendering engine and interactive pen.
请参见图1,图1提供了一种交互笔的示意图,图1中,该交互笔1包含至少三个按键,该三个按键可以为UE4引擎提供按键信息,每一个按键都有按下和松开两种状态。其中,本发明设置的基本交互方式为:Please refer to Figure 1, Figure 1 provides a schematic diagram of an interactive pen, in Figure 1, the
第一按键11:用于控制抓取模型,选中某个模型则抓取该模型,选中其他空白区域则抓取全部模型。The first button 11: used to control the capture model, select a certain model to capture the model, select other blank areas to capture all the models.
第二按键12:用于旋转和缩放模型,抓取空白区域视为缩放旋转全部。The second button 12: used to rotate and scale the model, grabbing the blank area is regarded as all of the zoom and rotation.
第三按键13:单击返回菜单,长按用于提供给其他软件进行数据校准。The third button 13: Click to return to the menu, long press to provide data calibration to other software.
接下来对于本发明提供的桌面交互系统中涉及到的关键类进行说明:Next, the key classes involved in the desktop interactive system provided by the present invention are described:
BP_DeskController:实现交互笔功能对应的类。BP_DeskController: The class corresponding to the interactive pen function.
BP_InteractableActor:基础的可交互物体类,实现基本的交互功能BP_InteractableActor: Basic interactive object class, which realizes basic interactive functions
BP_InteractionHelper:交互框架的核心类,用于辅助抓取、旋转等交互操作。BP_InteractionHelper: The core class of the interaction framework, used to assist in interactive operations such as grasping and rotation.
IInteractive:接口,所有的交互类(交互物、功能按钮)都要实现这个接口。CheckCanPickUp是其中的一个接口函数,交互物基类BP_InteractableActor中返回ture,按钮基类返回为false。IInteractive: interface, all interactive classes (interactive objects, function buttons) must implement this interface. CheckCanPickUp is one of the interface functions. The base class of the interactive object BP_InteractableActor returns true, and the base class of the button returns false.
这个交互框架的核心思路是利用一个Acotr(BP_InteractionHelper)作为辅助工具,将用户的想要操作的模型物品Attach到该Actor上,然后调用写在该Actor上的交互方法操作这个Actor,实现对场景内交互物体的操控。The core idea of this interaction framework is to use an Acotr (BP_InteractionHelper) as an auxiliary tool to attach the model item that the user wants to operate to the Actor, and then call the interaction method written on the Actor to operate the Actor to realize the interaction in the scene. Manipulation of interactive objects.
接下来对于交互逻辑框架的实现进行描述:Next, the implementation of the interaction logic framework is described:
S1:新建一个名为“BP_DeskController”类作为与交互笔对接的类。S1: Create a new class named "BP_DeskController" as a class that interfaces with the interactive pen.
S2:向“BP_DeskController”中加入IMUPenComponent组件,该组件能够获取交互笔的按键状态,比如第一按键11被按下但还没有被松开的状态。请参见图2与图3,图2提供了一种添加IMUPenComponent组件的示意图。图3提供了一种IMUPenComponent组件提供的事件示意图。S2: Add an IMUPenComponent component to the "BP_DeskController", which can obtain the key state of the interactive pen, such as the state that the first key 11 is pressed but not released. Please refer to Figure 2 and Figure 3, Figure 2 provides a schematic diagram of adding an IMUPenComponent component. Fig. 3 provides a schematic diagram of events provided by the IMUPenComponent component.
请参见图4,图4提供了一种桌面交互系统的示意图,该桌面交互系统的示意图中,可以包含交互笔1与交互设备2。该交互设备2可以包括平板电脑、手机或者3D沙盘等能够显示各种静态模型和骨骼模型的设备。Please refer to FIG. 4 . FIG. 4 provides a schematic diagram of a desktop interactive system. The schematic diagram of the desktop interactive system may include an
如前述,该交互笔1可以包含至少三个按键,其中,每个所述按键具有按下和松开两种状态,所述按键用于接收用户的按压与及松开操作,并将所述按压与松开操作发送至所交互设备2。该交互设备2,用于根据所述按压与所述松开操作对模型进行抓取、旋转、缩放以及返回操作。以下分别对抓取模型、旋转模型、缩放模型以及返回操作进行说明:As mentioned above, the
1、对于抓取功能的实现:1. For the realization of the grabbing function:
该交互笔1中包括的第一按键11用于控制抓取模型。交互设备2,用于顺着交互笔1所指的方向做射线检测,并将射线检测返回的命中结果存储为第一变量;当交互设备2从交互笔1处获取到第一按键11被按下时,交互设备2判断第一变量是否有效;若第一变量有效,则交互设备2将射线检测命中结果对应的模型进行抓取。若第一变量无效时,抓取交互框内全部模型。The
具体的,该交互设备2通过“BP_DeskController”顺着交互笔所指的方向一直做射线检测,并一直返回射线命中结果,并将该中结果储存为变量“TraceHit”。当第一按键11被按下时,先判断“TraceHit”中的HitActor是否是有效的。Specifically, the
如果是有效的,再判断该HitActor是否实现了“IInteractive”接口。这个接口内定义了基等本的抓取、缩放用于交互的接口事件,并且在可交互物体基类“BP_InteractableActor”中实现。场景中所有可以被用户交互的模型等物体都属于可交互物体,都只需要继承“BP_InteractableActor”类就能与交互笔1产生交互。将该射线指向的模型进行抓取。If it is valid, then judge whether the HitActor implements the "IInteractive" interface. This interface defines basic grabbing and zooming interface events for interaction, and is implemented in the base class "BP_InteractableActor" of interactive objects. All models and other objects in the scene that can be interacted with by the user are interactive objects, and they only need to inherit the "BP_InteractableActor" class to interact with the
如果是无效的,或是没有继承“IInteractive”接口,则判定为未击中可交互物体,在本交互框架内这视为抓取场景内的全部交互物体。先调用UE4引擎API:GetAllActorsWithInterface获取到场景中所有的继承了“IInteractive”接口的Actor,遍历这些Actors并调用接口内的函数CheckCanPickUp(),若返回为ture,则这个Actor是可抓取的,调用UE4引擎API:AttachActorToActor将所有可抓取的Actor Attach(吸附、附加)到BP_InteractionHelper上,对BP_InteractionHelper进行操作即实现了抓取全部的可交互物体的功能。If it is invalid, or does not inherit the "IInteractive" interface, it is determined that the interactive object has not been hit. In this interaction framework, this is regarded as grabbing all interactive objects in the scene. First call the UE4 engine API: GetAllActorsWithInterface to get all the Actors that inherit the "IInteractive" interface in the scene, traverse these Actors and call the function CheckCanPickUp() in the interface, if the return is true, the Actor is grabable, call UE4 engine API: AttachActorToActor attaches (adsorbs, attaches) all graspable Actors to BP_InteractionHelper, and operates BP_InteractionHelper to realize the function of grasping all interactive objects.
2、对于旋转功能的实现:2. For the realization of the rotation function:
当该交互笔1的第二按键12被按下时,获取自身的旋转角度,并将所述旋转角度发送至所述交互设备2;所述交互设备2,还用于根据所述旋转角度对所述抓取到的模型进行旋转。需要说明的是,该旋转功能需要以抓取功能为基础,只有抓取到模型之后才能对抓取到的模型进行旋转。When the
具体的,无论是对单个模型进行操作还是对多个模型进行操作,都需要先将交互物Attach到BP_InteractionHelper上再操作BP_InteractionHelper。旋转是调用UE4引擎API:SetActorRotation并将交互笔自身的旋转赋值给BP_InteractionHelper。也就是说该交互笔1旋转的读书和抓取的模型旋转的度数相同。Specifically, whether you are operating on a single model or multiple models, you need to attach the interactive object to BP_InteractionHelper before operating BP_InteractionHelper. Rotation is to call the UE4 engine API: SetActorRotation and assign the rotation of the interactive pen itself to BP_InteractionHelper. That is to say, the degree of rotation of the book rotated by the
3、对于缩放功能的实现:3. For the realization of the zoom function:
当第二按键12被按下时,该交互笔1可以获取自身的坐标位置,并获取坐标位置的变化量,其中,所述坐标位置的变化量以第一方向为正方向,以与所述第一方向相反的方向为反方向,并将所述坐标位置的变化量发送至所述交互设备;所述交互设备2,还用于将所述坐标位置的变化量映射至所述抓取到的模型的虚拟坐标中,根据所述坐标位置的变化量对所述抓取的模型进行缩放。When the second key 12 is pressed, the
具体的,可以实现针对不同大小的交互模型进行非线性缩放。先获取Actor并调用其内部的API:GetBounds。该API返回actor的边界球半径。使用UE4的曲线工具制作一条非线性缩放曲线,类型为CurveFloat。在可交互模型的基类BP_InteractableActor的BeginPlay事件中获取Actor的初始半径值MeshBoundsRadius。再在需要进行缩放时调用引擎API:SetActorScale3D进行缩放,缩放的参数跟据MeshBoundsRadius到缩放曲线中获取对应的缩放比例。若是整体缩放,则遍历所有交互模型,以半径最大的为MeshBoundsRadius。Specifically, non-linear scaling for interaction models of different sizes can be implemented. Get the Actor first and call its internal API: GetBounds. This API returns the actor's bounding sphere radius. Use UE4's curve tool to make a non-linear scaling curve, the type is CurveFloat. Get the Actor's initial radius value MeshBoundsRadius in the BeginPlay event of the base class BP_InteractableActor of the interactive model. Then call the engine API: SetActorScale3D to scale when scaling is required, and the scaling parameters are obtained from the scaling curve according to the MeshBoundsRadius to obtain the corresponding scaling ratio. If it is the overall zoom, traverse all interaction models, and use the largest radius as MeshBoundsRadius.
可以通过交互笔1在现实中的位置和旋转映射到UE4引擎的虚拟世界中,示例性的,交互笔1向前移动视为缩小操作,向后拖动视为放大。The actual position and rotation of the
4、返回操作。4. Return to operation.
该第三按键13单击返回菜单,长按用于提供给其他软件进行数据校准。The third key 13 is single-clicked to return to the menu, and long-pressed is used to provide other software for data calibration.
本申请提供的这种桌面交互系统实现了基于3D桌面系统的UE4内容能够通过交互笔对UE4内容场景中的模型实现多种交互方式。The desktop interaction system provided by the present application realizes that the UE4 content based on the 3D desktop system can realize multiple interaction modes for the models in the UE4 content scene through the interactive pen.
有鉴于上述桌面交互系统,本申请还提供了一种桌面交互方法,该桌面交互方法应用于上述桌面交互系统。请参见图5,该方法包括:In view of the above desktop interaction system, the present application further provides a desktop interaction method, which is applied to the above desktop interaction system. See Figure 5, the method includes:
S301、接收用户对于按键的按压与松开操作,并将按压与松开操作发送至交互设备。S301. Receive a user's press and release operations on a button, and send the press and release operations to an interactive device.
S302、根据按压与松开操作对模型进行抓取、旋转、缩放以及返回操作。S302. Perform grabbing, rotating, zooming and returning operations on the model according to the pressing and releasing operations.
以下对于步骤S301与步骤S302进行整体说明:The following is an overall description of step S301 and step S302:
所述交互笔包括第一按键,所述第一按键用于控制抓取模型;顺着所述交互笔所指的方向做射线检测,并将所述射线检测返回的命中结果存储为第一变量;当获取到所述第一按键被按下时,判断所述第一变量是否有效;当所述第一变量有效时,将所述射线检测命中结果对应的模型进行抓取。The interactive pen includes a first button, and the first button is used to control the grasping model; perform ray detection along the direction pointed by the interactive pen, and store the hit result returned by the ray detection as a first variable ; When it is acquired that the first button is pressed, judge whether the first variable is valid; when the first variable is valid, capture the model corresponding to the ray detection hit result.
当判断所述第一变量无效时,抓取交互框内全部模型。When it is judged that the first variable is invalid, grab all the models in the interaction frame.
当第二按键被按下时,所述交互笔获取自身的旋转角度,并将所述旋转角度发送至所述交互设备;所述交互设备根据所述旋转角度对所述抓取到的模型进行旋转。When the second button is pressed, the interactive pen obtains its own rotation angle, and sends the rotation angle to the interaction device; rotate.
当第二按键被按下时,所述交互笔获取自身的坐标位置,并获取坐标位置的变化量,其中,所述坐标位置的变化量以第一方向为正方向,以与所述第一方向相反的方向为反方向,并将所述坐标位置的变化量发送至所述交互设备;所述交互设备,将所述坐标位置的变化量映射至所述抓取到的模型的虚拟坐标中,根据所述坐标位置的变化量对所述抓取的模型进行缩放。When the second button is pressed, the interactive pen acquires its own coordinate position and the change amount of the coordinate position, wherein, the change amount of the coordinate position takes the first direction as the positive direction, so as to be consistent with the first direction The direction opposite to the direction is the opposite direction, and the change of the coordinate position is sent to the interaction device; the interaction device maps the change of the coordinate position to the virtual coordinate of the captured model , scaling the captured model according to the change amount of the coordinate position.
图6是本申请实施例提供的一种交互设备的结构示意图,该交互设备400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(cemtrml processimgumits,CPU)410(例如,一个或一个以上处理器)和存储器420,一个或一个以上存储应用程序433或数据432的存储介质430(例如一个或一个以上海量存储设备)。其中,存储器420和存储介质430可以是短暂存储或持久存储。存储在存储介质430的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对交互设备400中的一系列指令操作。更进一步地,处理器410可以设置为与存储介质430通信,在交互设备400上执行存储介质430中的一系列指令操作。FIG. 6 is a schematic structural diagram of an interactive device provided by an embodiment of the present application. The
交互设备400还可以包括一个或一个以上电源440,一个或一个以上有线或无线网络接口430,一个或一个以上输入输出接口460,和/或,一个或一个以上操作系统431,例如Wimdows Serve,Nmc OS X,Umix,Limux,FreeBSD等等。本领域技术人员可以理解,图6示出的交互设备结构并不构成对数据处理设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行所述桌面交互实现方法的步骤。The present application also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium may also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are run on the computer, the computer is made to execute the steps of the method for implementing desktop interaction.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(remd-omly nenory,RON)、随机存取存储器(rmmdon mccess nenory,RMN)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (remd-omly nenory, RON), random access memory (rmmdon mccess nenory, RMN), magnetic disk or optical disc, etc., which can store program codes. .
在本申请所提供的实施例中,应该理解到,所揭露的方法,在没有超过本申请的精神和范围内,可以通过其他的方式实现。当前的实施例只是一种示范性的例子,不应该作为限制,所给出的具体内容不应该限制本申请的目的。例如,一些特征可以忽略,或不执行。In the embodiments provided in the present application, it should be understood that the disclosed methods can be implemented in other ways without exceeding the spirit and scope of the present application. The present embodiment is only an exemplary example and should not be taken as a limitation, and the specific content given should not limit the purpose of the present application. For example, some features may be ignored, or not implemented.
本申请方案所公开的技术手段不仅限于上述实施方式所公开的技术手段,还包括由以上技术特征任意组合所组成的技术方案。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本申请的保护范围。The technical means disclosed in the solutions of this application are not limited to the technical means disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principles of the present application, and these improvements and modifications are also regarded as the protection scope of the present application.
以上对本申请实施例所提供的一种桌面交互系统及实现方法、存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。The above is a detailed introduction to the desktop interactive system, implementation method and storage medium provided by the embodiment of the present application. In this paper, specific examples are used to illustrate the principle and implementation of the present application. The description of the above embodiment is only for To help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation and application scope. In summary, the content of this specification It should not be construed as a limitation of the application. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: they can still modify the technical solutions described in the aforementioned embodiments, or perform equivalent replacements for some of the technical features; and these The modification or replacement does not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210906137.8A CN115373513A (en) | 2021-06-17 | 2021-06-17 | Desktop interaction system, realization method and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110675887.4A CN113467613A (en) | 2021-06-17 | 2021-06-17 | Desktop interaction system, realization method and storage medium |
| CN202210906137.8A CN115373513A (en) | 2021-06-17 | 2021-06-17 | Desktop interaction system, realization method and storage medium |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110675887.4A Division CN113467613A (en) | 2021-06-17 | 2021-06-17 | Desktop interaction system, realization method and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115373513A true CN115373513A (en) | 2022-11-22 |
Family
ID=77870453
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110675887.4A Pending CN113467613A (en) | 2021-06-17 | 2021-06-17 | Desktop interaction system, realization method and storage medium |
| CN202210906137.8A Pending CN115373513A (en) | 2021-06-17 | 2021-06-17 | Desktop interaction system, realization method and storage medium |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110675887.4A Pending CN113467613A (en) | 2021-06-17 | 2021-06-17 | Desktop interaction system, realization method and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (2) | CN113467613A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119248123A (en) * | 2024-12-06 | 2025-01-03 | 南京维赛客网络科技有限公司 | Method, system and storage medium for controlling model rotation when using space pen interaction |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106200985A (en) * | 2016-08-10 | 2016-12-07 | 北京天远景润科技有限公司 | Desktop type individual immerses virtual reality interactive device |
| CN106648152A (en) * | 2016-12-14 | 2017-05-10 | 吉林大学 | Rotary angle and distance-based three-dimensional pen interaction interface zooming method |
| CN108563341A (en) * | 2018-04-13 | 2018-09-21 | 吉林大学 | A kind of three-dimensional touch electronic pen and method with vibrotactile feedback |
| CN109508093A (en) * | 2018-11-13 | 2019-03-22 | 宁波视睿迪光电有限公司 | A kind of virtual reality exchange method and device |
| CN112451967A (en) * | 2020-12-11 | 2021-03-09 | 深圳市瑞立视多媒体科技有限公司 | Game interaction method and device based on 3D screen interaction and computer equipment |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8176438B2 (en) * | 2008-09-26 | 2012-05-08 | Microsoft Corporation | Multi-modal interaction for a screen magnifier |
| KR101595319B1 (en) * | 2014-11-13 | 2016-02-18 | (주)컴버스테크 | Electric pen for interactive board |
| CN111459265B (en) * | 2020-03-02 | 2023-10-13 | 杭州嘉澜创新科技有限公司 | Interactive device, operation method thereof and computer readable storage medium |
| CN112258637A (en) * | 2020-10-29 | 2021-01-22 | 潍坊学院 | Virtual display method, system, medium, equipment and terminal for non-cultural item |
| CN112558761A (en) * | 2020-12-08 | 2021-03-26 | 南京航空航天大学 | Remote virtual reality interaction system and method for mobile terminal |
-
2021
- 2021-06-17 CN CN202110675887.4A patent/CN113467613A/en active Pending
- 2021-06-17 CN CN202210906137.8A patent/CN115373513A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106200985A (en) * | 2016-08-10 | 2016-12-07 | 北京天远景润科技有限公司 | Desktop type individual immerses virtual reality interactive device |
| CN106648152A (en) * | 2016-12-14 | 2017-05-10 | 吉林大学 | Rotary angle and distance-based three-dimensional pen interaction interface zooming method |
| CN108563341A (en) * | 2018-04-13 | 2018-09-21 | 吉林大学 | A kind of three-dimensional touch electronic pen and method with vibrotactile feedback |
| CN109508093A (en) * | 2018-11-13 | 2019-03-22 | 宁波视睿迪光电有限公司 | A kind of virtual reality exchange method and device |
| CN112451967A (en) * | 2020-12-11 | 2021-03-09 | 深圳市瑞立视多媒体科技有限公司 | Game interaction method and device based on 3D screen interaction and computer equipment |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119248123A (en) * | 2024-12-06 | 2025-01-03 | 南京维赛客网络科技有限公司 | Method, system and storage medium for controlling model rotation when using space pen interaction |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113467613A (en) | 2021-10-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5807686B2 (en) | Image processing apparatus, image processing method, and program | |
| JP5475792B2 (en) | Multi-touch object inertia simulation | |
| CN103631768B (en) | Collaborative Data Editing and Processing System | |
| US8799821B1 (en) | Method and apparatus for user inputs for three-dimensional animation | |
| JP5508269B2 (en) | System and method for manipulating digital images on a computer display | |
| JP6433923B2 (en) | Providing a specific object location to the device | |
| CN104360633B (en) | A kind of man-machine interactive system of Service Robots | |
| JP2016006649A (en) | Drag and drop of objects between applications | |
| CN102804161A (en) | Application sharing | |
| TW201020919A (en) | Multi-touch manipulation of application objects | |
| CN103890704A (en) | System and method for performing three-dimensional object constraint operation through multi-touch input | |
| JP2011123896A (en) | Method and system for duplicating object using touch-sensitive display | |
| CN110506264A (en) | Live ink rendering for real-time collaboration | |
| CN114931746A (en) | Interaction method, device and medium for 3D game based on pen type and touch screen interaction | |
| CN115373513A (en) | Desktop interaction system, realization method and storage medium | |
| CN114327063B (en) | Interaction method and device of target virtual object, electronic equipment and storage medium | |
| US10496237B2 (en) | Computer-implemented method for designing a three-dimensional modeled object | |
| Bærentzen et al. | Signifier-based immersive and interactive 3D modeling | |
| CN114546382A (en) | A cloud-native engineering graphics interactive system | |
| CN119524403A (en) | Method, device, equipment and storage medium for adjusting objects in virtual scenes | |
| Erlemeier | The development of a virtual reality based cad system for design review | |
| CN120143995A (en) | Mouse control monitoring method and device | |
| CN117666765A (en) | Display method, device, electronic equipment and media of attribute setting control | |
| Sarkar et al. | Virtual content suction user interface for android devices | |
| CN103984481A (en) | Information processing method and input equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |