Summary of the invention
The present invention provides a kind of virtual reality exchange method and device, wears to solve user existing in the prior artWhen non-VR application program in VR equipment and VR equipment interacts, accuracy rate is relatively low, and operate very inconvenient skillArt problem.
On the one hand, the embodiment of the present invention provides a kind of virtual reality exchange method, comprising:
In the touch event for detecting touch screen, however, it is determined that current application program is non-virtual reality VR application program,Then determine the type of the touch event, the touch screen is used to receive the touching instruction of user's input;
If it is determined that the type of the touch event is to press event for the first time, it is determined that the object that head control cursor is directed toward, and it is rightThe object that the head control cursor is directed toward carries out respective handling, and the position of the head control cursor within display screen is fixed.
Optionally, the object that the head control cursor is directed toward is control button;
The object being directed toward to the head control cursor carries out respective handling, comprising:
Event handling mode is pressed for the first time according to the predefined control button is corresponding, determines the first predefined processingEvent;
It is handled according to the described first predefined processing event.
Optionally, the object that the head control cursor is directed toward is virtual screen, and the virtual screen is located at the display screenAmong, for showing the current application program;
The object being directed toward to the head control cursor carries out respective handling, comprising:
According to the interface direction of the position coordinates of the head control cursor and the virtual screen, in the touch eventTouch coordinate is modified for the first time, is corrected touch coordinate for the first time, and the amendment touch coordinate for the first time is pressed for the first time to be describedThe coordinate of the corresponding virtual screen of event;
According to the touch coordinate update of the amendment for the first time touch event, the touch event updated, and by inputtingEvent manager module handles the touch event of the update.
Optionally, after the type of the determination touch event, further includes:
If it is determined that the type of the touch event is non-to press event for the first time, it is determined that occur described non-to press event for the first timeIt is corresponding to press the object that the head control cursor is directed toward when event for the first time, and the object that the head control cursor is directed toward is carried out correspondingProcessing.
Optionally, occur described non-to press that event is corresponding to press pair that the head control cursor is directed toward when event for the first time for the first timeAs for control button;
The object being directed toward to the head control cursor carries out respective handling, comprising:
According to the predefined control button it is corresponding it is non-press event handling mode for the first time, determine the second predefined placeDirector's part;
It is handled according to the described second predefined processing event.
Optionally, occur described non-to press that event is corresponding to press pair that the head control cursor is directed toward when event for the first time for the first timeAs for virtual screen;
The object being directed toward to the head control cursor carries out respective handling, comprising:
Touching for the first time when according to the non-non- touch coordinate for the first time pressed in event for the first time and occurring to press event for the first timeCoordinate is touched, determines difference value;
The touch coordinate of amendment for the first time when event for the first time occurs is modified according to the difference value, obtains non-repairing for the first timePositive touch coordinate, the non-touch coordinate of amendment for the first time is the non-seat for pressing the corresponding virtual screen of event for the first timeMark;
The touch event is updated according to the non-touch coordinate of amendment for the first time, obtains updated touch event, and byIncoming event management module handles the touch event of the update.
Optionally, described that event is pressed according to the non-non- touch coordinate for the first time pressed in event for the first time and generation for the first timeWhen touch coordinate for the first time, determine difference value, comprising:
If the interface of the virtual screen towards with the touch screen towards identical, it is determined that non-touch for the first time sitMark and the difference that the touch coordinate for the first time when pressing event for the first time occurs, and after the difference is adjusted by preset ratio,As the difference value;
If the interface direction of the virtual screen is different from the direction of the touch screen, it is determined that non-touch for the first time is satThe difference of the touch coordinate for the first time when pressing event for the first time with generation is marked, and by the difference according to the interface of the virtual screenTowards the direction with the touch screen, after carrying out rotation to the difference and being adjusted by the preset ratio, as describedDifference value.
On the other hand, the embodiment of the present invention provides a kind of virtual reality interactive device, comprising:
Touch event type determining units, in the touch event for detecting touch screen, however, it is determined that current application journeySequence is non-virtual reality VR application program, it is determined that the type of the touch event, the touch screen is for receiving user's inputTouching instruction;
Processing unit, for if it is determined that the type of the touch event is to press event for the first time, it is determined that head control cursor refers toTo object, and to the head control cursor be directed toward object carry out respective handling, the position of the head control cursor within display screenSet fixation.
Optionally, the object that the head control cursor is directed toward is control button;
The processing unit, is specifically used for:
Event handling mode is pressed for the first time according to the predefined control button is corresponding, determines the first predefined processingEvent;
It is handled according to the described first predefined processing event.
Optionally, the object that the head control cursor is directed toward is virtual screen, and the virtual screen is located at the display screenAmong, for showing the current application program;
The processing unit, is specifically used for:
According to the interface direction of the position coordinates of the head control cursor and the virtual screen, in the touch eventTouch coordinate is modified for the first time, is corrected touch coordinate for the first time, and the amendment touch coordinate for the first time is pressed for the first time to be describedThe coordinate of the corresponding virtual screen of event;
According to the touch coordinate update of the amendment for the first time touch event, the touch event updated, and will be by defeatedIncoming event management module handles the touch event of the update.
Optionally, the processing unit, is also used to:
If it is determined that the type of the touch event is non-to press event for the first time, it is determined that occur described non-to press event for the first timeIt is corresponding to press the object that the head control cursor is directed toward when event for the first time, and the object that the head control cursor is directed toward is carried out correspondingProcessing.
Optionally, occur described non-to press that event is corresponding to press pair that the head control cursor is directed toward when event for the first time for the first timeAs for control button;
The processing unit, is specifically used for:
According to the predefined control button it is corresponding it is non-press event handling mode for the first time, determine the second predefined placeDirector's part;
It is handled according to the described second predefined processing event.
Optionally, occur described non-to press that event is corresponding to press pair that the head control cursor is directed toward when event for the first time for the first timeAs for virtual screen;
The processing unit, is specifically used for:
Touching for the first time when according to the non-non- touch coordinate for the first time pressed in event for the first time and occurring to press event for the first timeCoordinate is touched, determines difference value;
The touch coordinate of amendment for the first time when event for the first time occurs is modified according to the difference value, obtains non-repairing for the first timePositive touch coordinate, the non-touch coordinate of amendment for the first time is the non-seat for pressing the corresponding virtual screen of event for the first timeMark;
The touch event is updated according to the non-touch coordinate of amendment for the first time, obtains updated touch event, and byIncoming event management module handles the touch event of the update.
Optionally, the processing unit, is specifically used for:
If the interface of the virtual screen towards with the touch screen towards identical, it is determined that non-touch for the first time sitMark and the difference that the touch coordinate for the first time when pressing event for the first time occurs, and after the difference is adjusted by preset ratio,As the difference value;
If the interface direction of the virtual screen is different from the direction of the touch screen, it is determined that non-touch for the first time is satThe difference of the touch coordinate for the first time when pressing event for the first time with generation is marked, and by the difference according to the interface of the virtual screenTowards the direction with the touch screen, after carrying out rotation to the difference and being adjusted by the preset ratio, as describedDifference value.
The embodiment of the present invention, in the touch event for detecting touch screen, however, it is determined that current application program is non-virtual existingReal VR application program, it is determined that the type of the touch event, the touch screen are used to receive the touching instruction of user's input;IfThe type for determining the touch event is to press event for the first time, it is determined that the object that head control cursor is directed toward, and to the head control lightThe object that mark is directed toward carries out respective handling, and the position of the head control cursor within display screen is fixed.The embodiment of the present invention, by withFamily changes the display position of the non-VR application program shown in display screen, by head movement so as to change head control lightThe object being directed toward is marked, then by user by generating touch event after touching on the touchscreen, the touch event is for correct controlObject pointed by cursor carries out respective handling, to be processed the method achieve being thought by head movement discount control cursor directionThen object is accordingly controlled by touch screen, user can accurately determine the object to be operated, so as to bigThe big success rate for improving operation so that user's operation get up it is more convenient.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make intoIt is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementationExample.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative effortsAll other embodiment, shall fall within the protection scope of the present invention.
The embodiment of the present invention is described in further detail with reference to the accompanying drawings of the specification.
As shown in Fig. 2, a kind of virtual reality exchange method provided in an embodiment of the present invention, comprising:
Step 201, in the touch event for detecting touch screen, however, it is determined that current application program be non-virtual reality VR answerWith program, it is determined that the type of the touch event, the touch screen are used to receive the touching instruction of user's input;
Step 202, if it is determined that the touch event type be press event for the first time, it is determined that head control cursor be directed toward pairAs, and respective handling is carried out to the object that the head control cursor is directed toward, the position of the head control cursor within display screen is fixed.
If Fig. 3 is virtual screen provided in an embodiment of the present invention and head control cursor display schematic diagram, wherein user passes through pendantWear VR equipment, it can be seen that display screen (in Fig. 3 shown in latticed background), display screen is for showing VR application program, InThere is virtual screen on display screen, for showing non-VR application program (such as wechat application program, Alipay application program, clockApplication program, suspended window application program, pop-up application program etc.), in Fig. 3 example, the clock shown in virtual screen is answeredWith program, wherein the particular content shown are as follows: 08:18AM.
When having non-VR application program on the display screen in VR equipment in virtual screen display, also has control button and go outIt is existing, as shown in figure 3, control button has WIFI signal to prompt control, VR equipment capacity prompt control, virtual screen zoom in control,Virtual screen reduces control, virtual screen anticlockwise control, virtual screen right rotation control etc., wherein the control button havingIt can interact, such as the virtual screen zoom in control in Fig. 3, virtual screen reduces control, virtual screen anticlockwise control, virtual screenRight rotation control;Some control buttons are served only for watching, and can not interact, as the WIFI signal in Fig. 3 prompts control, VR equipment electricityAmount prompt control.
In addition, also showing head control cursor in display screen, the position of the head control cursor within display screen is fixed.ExampleSuch as by taking Fig. 3 as an example, head control cursor is shown in the middle position of display screen, when user rotates head, can trigger to VR equipmentDisplay picture redraw system, for example, user to upper left side rotary head portion, then the picture after repainting is as shown in figure 4, whereinFig. 4 is virtual screen provided in an embodiment of the present invention and head control cursor display schematic diagram, when user is to upper left side rotary head portion,Entire VR application program and non-VR application program on virtual screen and control button can redraw system, but at this point, head controlThe position of cursor within display screen is constant, is still located at display screen middle position, works as user by the above-mentioned means, can realizeWhen passing through head rotation, head control cursor may make to be directed toward different objects and (for example, being directed toward VR application program, be directed toward virtual screenSome position, be directed toward control button), the embodiment of the present invention is based on this design, realize by user through head rotation,Discount control cursor is directed toward some object, and then user carrys out correct control light by carrying out touch operation on touch screen shown in Fig. 1The position that mark is directed toward performs corresponding processing, to realize the high efficiency interactive with virtual screen.
It is described in detail below with reference to Fig. 2.
In above-mentioned steps 201, it is (as empty in being directed toward to may make that head control cursor is directed toward some position by head rotation by userQuasi- screen, is directed toward control button, or be directed to VR application program), then user carries out corresponding touch operation by touch screen.
When VR equipment detects the touch event of touch screen, first determine whether that current application program is non-VR application program,Wherein, the touch screen is used to receive the touching instruction of user's input, as shown in figure 1 the touch screen on VR equipment side.
Specifically, it can judge that current application program is VR according to whether current application program includes some identification informationApplication program is also non-VR application program.For example, can divide in page allocation managing module (gralloc of such as Android)One label of the page data structure steganography allotted is used to distinguish non-VR and applies and VR application.Specific judgment basis are as follows: ifSome is extended using this EGL of egl_GVR_FrontBuffer, then the application is that VR is applied, if not using thisA EGL extension, the then application are that non-VR is applied, and judges that current application program be VR application program is also that non-VR is applied to facilitateProgram.
In addition, current application program refers to the application program of top layer in VR equipment.The available top layer of VR equipmentApplication program, and using the application program of top layer as current application program.
If it is determined that current application program is non-virtual reality VR application program, it is determined that the type of the touch event,In, the type of touch event is divided into touch event for the first time and non-touch event for the first time.
Illustrate respectively below for the type point situation of touch event.
Situation one, the type of touch event are touch event for the first time
In above-mentioned steps 202, however, it is determined that the type of the touch event is to press event for the first time, it is determined that head control cursorThe object of direction, and respective handling is carried out to the object that the head control cursor is directed toward, the head control cursor is within display screenPosition is fixed.
According to head control cursor be directed toward object, lower mask body divide three kinds of situations again illustrate respectively,
One, the object that the head control cursor is directed toward is control button.
The object being directed toward to the head control cursor carries out respective handling, comprising: is pressed according to the predefined controlButton is corresponding to press event handling mode for the first time, determines the first predefined processing event;According to the described first predefined processing thingPart is handled.
With reference to Fig. 2, i.e., (so-called key for the first time, refers in this key-press event when carrying out key for the first time on the touchscreenBefore, touch screen is in and is not pressed state, i.e., no finger rests on above touch screen), at this point, head control cursor is directed toward controlButton, such as head control cursor are directed toward virtual screen large buttons, then corresponding according to virtual screen large buttons predeterminedIt presses time-triggered protocol mode for the first time, carries out respective handling, for example predefined virtual screen large buttons are corresponding presses for the first timeTime-triggered protocol mode is by screen magnifying 10% etc..
Two, the object that the head control cursor is directed toward is virtual screen, and the virtual screen is located among the display screen,For showing the current application program
The object being directed toward to the head control cursor carries out respective handling, comprising: according to the position of the head control cursorThe interface direction of coordinate and the virtual screen is modified the touch coordinate for the first time in the touch event, obtains for the first timeTouch coordinate is corrected, the touch coordinate of amendment for the first time is the coordinate for pressing the corresponding virtual screen of event for the first time;According to the touch coordinate update of the amendment for the first time touch event, the touch event updated, and by incoming event managementModule handles the touch event of the update.
Specifically, first according to head control cursor position coordinate (wherein the position coordinates of head control cursor are fixed and invariable, whenWhen user's head rotates, since VR is applied, virtual screen and control button can all be redrawn, therefore pair that head control cursor can be directed towardAs if can change), and transverse screen mode or vertical screen mode (are referred to, wherein empty according to the interface direction of virtual screenThe interface of quasi- screen towards can change, but touch screen due to be it is fixed, the interface of touch screen is towards being notBecome, the interface direction that this will lead to virtual screen is identical towards possibility as the interface of touch screen, it is also possible to not identical), to touchingThe touch coordinate for the first time touched in event is modified, and is corrected touch coordinate for the first time, wherein the touch for the first time of touch event is satMark refers to the coordinate for the position that user touches on the touchscreen, it is now desired to be modified to it, be corrected touch for the first timeCoordinate, wherein correct the seat on virtual screen after touch coordinate refers to touch coordinate is modified for the first time, obtained for the first timeMark.
In embodiments of the present invention, specifically correcting mode are as follows: if the interface of virtual screen towards and touch screen boundaryFacing towards identical, then touch coordinate is corrected for the first time using the touch coordinate for the first time in touch event as described;If virtual screenInterface towards with the interface of touch screen towards not identical, then will be in touch event (one after touch coordinate is rotated for the first timeAs be rotated by 90 ° or 270 degree) as described correct touch coordinate for the first time.
Three, the object that the head control cursor is directed toward is VR application program
If touch event is touch event for the first time, and the object that head control cursor is directed toward is VR application program, then does not do anyProcessing, i.e., in the embodiment of the present invention, touch screen is only intended to interact with non-VR application program or head control cursor, without withThe interaction of VR application program.
Situation two, the type of touch event are non-touch event for the first time
Optionally, after the type of the determination touch event, however, it is determined that the type of the touch event is non-headIt is secondary to press event, it is determined that occur described non-to press that event is corresponding to press what head control cursor when event was directed toward for the first time for the first timeObject, and respective handling is carried out to the object that the head control cursor is directed toward.
According to occur it is described it is non-press that event is corresponding to press event for the first time for the first time when the object that is directed toward of the head control cursor,Lower mask body also divides three kinds of situations to illustrate respectively again.
One, the non-object for pressing head control cursor direction when event is corresponding to press event for the first time for the first time, which occurs, isControl button
The object being directed toward to the head control cursor carries out respective handling, comprising: is pressed according to the predefined controlButton it is corresponding it is non-press event handling mode for the first time, determine the second predefined processing event;According to the described second predefined processingEvent is handled.
For example, when user presses touch screen for the first time, it is volume zoom in control that the object that head control cursor is directed toward, which is control,Button, then user's finger is not lifted, and is slided to some direction, be can detecte slip event during sliding, i.e.,Press event for the first time to be non-, then it can be according to the predefined processing event (example of volume zoom in control button predetermined secondFor example volume magnification event or volume down event).
Two, the non-object for pressing head control cursor direction when event is corresponding to press event for the first time for the first time, which occurs, isVirtual screen
The object being directed toward to the head control cursor carries out respective handling, comprising:
Step A, according to the non-non- touch coordinate for the first time pressed in event for the first time and when occurring to press event for the first timeTouch coordinate for the first time determines difference value.
In the step, the non-non- touch coordinate for the first time pressed in event for the first time is determined, such as currently had one firstFinger is pressed on touch screen, and right the latter second finger slides in and out the position near the first finger, then can be obtainedSecond finger is got in the non-non- touch coordinate for the first time pressed in event for the first time, and gets generation and presses event for the first time (i.e.First finger presses event) when the touch coordinate for the first time that stores, so as to calculate difference value between the two.
Optionally, described that event is pressed according to the non-non- touch coordinate for the first time pressed in event for the first time and generation for the first timeWhen touch coordinate for the first time, determine difference value, comprising: if the interface of the virtual screen towards with the touch screen towards phaseTogether, it is determined that the non-touch coordinate for the first time and the difference that the touch coordinate for the first time when pressing event for the first time occurs, and will be describedAfter difference is adjusted by preset ratio, as the difference value;If interface direction and the touch screen of the virtual screenDirection it is different, it is determined that the difference of the non-touch coordinate for the first time and the touch coordinate for the first time when occurring to press event for the first time,And the difference rotates simultaneously the difference according to the direction of the interface direction and the touch screen of the virtual screenAfter being adjusted by the preset ratio, as the difference value.
For example, coordinate when user presses touch screen for the first time is (1,2), user's holding presses the finger of touch screen not for the first timeLift, then slided on the screen with another finger, then can detect it is non-press event for the first time, if user is to touchIt touches and is slided on screen, then can detecte a series of non-touch event for the first time, to obtain corresponding non-pressing event pair for the first timeThe coordinate answered, if it is respectively as follows: (1,3), (Isosorbide-5-Nitrae), (1,5).Then available a series of difference: (0,1), (0,2), (0,3)。
Then, according to the interface of virtual screen towards the relationship with the direction of the touch screen, it is determined whether need to differenceDifferent value is rotated, if the interface of virtual screen towards identical, does not need to rotate towards with the touch screen;If virtual screenThe interface of curtain then needs to rotate, such as can be and be rotated by 90 ° or 270 degree towards different from the direction of the touch screenEtc..
Then, after being adjusted according to preset ratio to above-mentioned difference, difference value is obtained, such as press to difference (0,2)According to the ratio enlargement of 1:2, then difference value is (0,4).
Step B, the touch coordinate of amendment for the first time when event for the first time occurs is modified according to the difference value, is obtained non-Correct touch coordinate for the first time, the non-touch coordinate of amendment for the first time is described non-to press the corresponding virtual screen of event for the first timeCoordinate.
In the step, the touch coordinate of amendment for the first time when event for the first time occurs is modified according to the difference value, i.e.,After obtaining difference value according to the difference between the coordinate on touch screen, according to the difference value to touch coordinate is corrected for the first time, obtainIt is non-to correct touch coordinate for the first time.
For example, the touch coordinate of amendment for the first time on virtual screen be (5.5,6.5), obtained difference value be (0,4) the non-touch coordinate of amendment for the first time, then obtained is (5.5,10.5), it can realizes and turns corresponding operating on the touchscreenThe corresponding operating being changed on virtual screen.
Certainly, in practical applications, respective handling is carried out again after generally all coordinate being normalized, in terms of improvingCalculate efficiency, in above-mentioned example using to coordinate be exemplary illustration.
Step C, the touch event is updated according to the non-touch coordinate of amendment for the first time, obtains updated touch thingPart, and handled by touch event of the incoming event management module to the update.
Wherein, incoming event management module is the modular unit of system-level management incoming event, belongs to VR in the prior artThe existing module of equipment, for being handled according to predefined mode incoming event.
Three, the non-object for pressing head control cursor direction when event is corresponding to press event for the first time for the first time, which occurs, isIt is empty
In this case, when user presses touch screen for the first time, it is that sky refers to head control cursor that head control cursor, which is directed toward object,Both without being directed toward virtual screen, also without being directed toward head control cursor, and other positions have been directed to, for example be directed toward background image,Then user does not lift finger, and has occurred and non-press event for the first time (such as user is slided using above-mentioned finger, or is madeTouch screen is operated again with other fingers), then it at this time can be using the non-event of pressing for the first time as the first time pressing eventProcessing, i.e., what is occurred when being empty by the object that the head control cursor is directed toward presses event as invalid event for the first time, thus will be withFor the non-event of pressing for the first time occurred afterwards as event is pressed for the first time to handle, specific processing mode can refer to the three of said circumstances oneSituation is planted to handle, details are not described herein.
The embodiment of the present invention, in the touch event for detecting touch screen, however, it is determined that current application program is non-virtual existingReal VR application program, it is determined that the type of the touch event, the touch screen are used to receive the touching instruction of user's input;IfThe type for determining the touch event is to press event for the first time, it is determined that the object that head control cursor is directed toward, and to the head control lightThe object that mark is directed toward carries out respective handling, and the position of the head control cursor within display screen is fixed.The embodiment of the present invention, by withFamily changes the display position of the non-VR application program shown in display screen, by head movement so as to change head control lightThe object being directed toward is marked, then by user by generating touch event after touching on the touchscreen, the touch event is for correct controlObject pointed by cursor carries out respective handling, to be processed the method achieve being thought by head movement discount control cursor directionThen object is accordingly controlled by touch screen, user can accurately determine the object to be operated, so as to bigThe big success rate for improving operation so that user's operation get up it is more convenient.
A kind of virtual reality exchange method provided in an embodiment of the present invention is described in detail below, as shown in figure 5, packetIt includes:
Step 501, the touch event for detecting touch screen.
Step 502 judges whether current application program is otherwise non-VR application program is gone to if then going to step 503Step 511.
Whether step 503, the type for judging the touch event are to press event for the first time, if then going to step 504, ifIt is no, then go to step 512.
Whether the object that step 504, head control cursor are directed toward is control button, if then going to step 505, otherwise goes to stepRapid 506.
Step 505, into customized control logical process.
That is, pressing event handling mode for the first time according to the predefined control button is corresponding, determine that first is predefinedProcessing event;It is handled according to the described first predefined processing event.
Whether the object that step 506, head control cursor are directed toward is virtual screen, if then going to step 507, otherwise terminates to flowJourney.
Step 507 is interacted into non-VR application program.
Event is pressed for the first time, such as has single finger to press event.
Step 508 backs up touch coordinate for the first time.
Step 509 is directed toward position coordinates and current interface direction according to head control cursor, calculates and backs up amendment touch for the first timeCoordinate.
Specifically, according to the interface direction of the position coordinates of the head control cursor and the virtual screen, to the touchTouch coordinate for the first time in event is modified, and is corrected touch coordinate for the first time, the touch coordinate of amendment for the first time is describedThe coordinate of the corresponding virtual screen of event is pressed for the first time.
Step 510 is updated the coordinate in touch event, the touch event updated.
Specifically, according to the touch coordinate update of the amendment for the first time touch event, the touch event updated, andIt is handled by touch event of the incoming event management module to the update.
Step 511, incoming event management module carry out respective handling to the touch event of the update received.
Specifically, it is the prior art that incoming event management module, which carries out processing to touch event, and this will not be repeated here.
The object that head control cursor is directed toward in event is pressed in step 512, judgement for the first time, if empty (i.e. both without being directed toward virtual screenCurtain, also without being directed toward control button), then step 504 is gone to, if virtual screen, then goes to step 514, if control button,Then go to step 513.
Step 513 goes successively to customized control logical process.
Specifically, according to the predefined control button it is corresponding it is non-press event handling mode for the first time, determine secondPredefined processing event;It is handled according to the described second predefined processing event.
Step 514 continues non-VR application program interaction.
Such as it is non-press for the first time event have refer to press event, singly refer to slip event etc..
Step 515 obtains non-touch coordinate for the first time.
Step 516, the non-touch coordinate for the first time for comparing acquisition and touch coordinate for the first time, obtain difference.
Step 517 rotates difference according to current interface direction, and obtains difference value after being scaled.
Step 518, difference value are added with amendment touch coordinate for the first time, obtain non-correcting touch coordinate for the first time.
The embodiment of the present invention, in the touch event for detecting touch screen, however, it is determined that current application program is non-virtual existingReal VR application program, it is determined that the type of the touch event, the touch screen are used to receive the touching instruction of user's input;IfThe type for determining the touch event is to press event for the first time, it is determined that the object that head control cursor is directed toward, and to the head control lightThe object that mark is directed toward carries out respective handling, and the position of the head control cursor within display screen is fixed.The embodiment of the present invention, by withFamily changes the display position of the non-VR application program shown in display screen, by head movement so as to change head control lightThe object being directed toward is marked, then by user by generating touch event after touching on the touchscreen, the touch event is for correct controlObject pointed by cursor carries out respective handling, to be processed the method achieve being thought by head movement discount control cursor directionThen object is accordingly controlled by touch screen, user can accurately determine the object to be operated, so as to bigThe big success rate for improving operation so that user's operation get up it is more convenient.
Based on the same technical idea, the embodiment of the present invention also provides a kind of virtual reality interactive device, as shown in fig. 6,Include:
Touch event type determining units 601, in the touch event for detecting touch screen, however, it is determined that current applicationProgram is non-virtual reality VR application program, it is determined that the type of the touch event, the touch screen are defeated for receiving userThe touching instruction entered;
Processing unit 602, for if it is determined that the type of the touch event is to press event for the first time, it is determined that head control cursorThe object of direction, and respective handling is carried out to the object that the head control cursor is directed toward, the head control cursor is within display screenPosition is fixed.
Optionally, the object that the head control cursor is directed toward is control button;
The processing unit 602, is specifically used for:
Event handling mode is pressed for the first time according to the predefined control button is corresponding, determines the first predefined processingEvent;
It is handled according to the described first predefined processing event.
Optionally, the object that the head control cursor is directed toward is virtual screen, and the virtual screen is located at the display screenAmong, for showing the current application program;
The processing unit 602, is specifically used for:
According to the interface direction of the position coordinates of the head control cursor and the virtual screen, in the touch eventTouch coordinate is modified for the first time, is corrected touch coordinate for the first time, and the amendment touch coordinate for the first time is pressed for the first time to be describedThe coordinate of the corresponding virtual screen of event;
According to the touch coordinate update of the amendment for the first time touch event, the touch event updated, and by inputtingEvent manager module handles the touch event of the update.
Optionally, the processing unit 602, is also used to:
If it is determined that the type of the touch event is non-to press event for the first time, it is determined that occur described non-to press event for the first timeIt is corresponding to press the object that the head control cursor is directed toward when event for the first time, and the object that the head control cursor is directed toward is carried out correspondingProcessing.
Optionally, occur described non-to press that event is corresponding to press pair that the head control cursor is directed toward when event for the first time for the first timeAs for control button;
The processing unit 602, is specifically used for:
According to the predefined control button it is corresponding it is non-press event handling mode for the first time, determine the second predefined placeDirector's part;
It is handled according to the described second predefined processing event.
Optionally, occur described non-to press that event is corresponding to press pair that the head control cursor is directed toward when event for the first time for the first timeAs for virtual screen;
The processing unit 602, is specifically used for:
Touching for the first time when according to the non-non- touch coordinate for the first time pressed in event for the first time and occurring to press event for the first timeCoordinate is touched, determines difference value;
The touch coordinate of amendment for the first time when event for the first time occurs is modified according to the difference value, obtains non-repairing for the first timePositive touch coordinate, the non-touch coordinate of amendment for the first time is the non-seat for pressing the corresponding virtual screen of event for the first timeMark;
The touch event is updated according to the non-touch coordinate of amendment for the first time, obtains updated touch event, and byIncoming event management module handles the touch event of the update.
Optionally, the processing unit 602, is specifically used for:
If the interface of the virtual screen towards with the touch screen towards identical, it is determined that non-touch for the first time sitMark and the difference that the touch coordinate for the first time when pressing event for the first time occurs, and after the difference is adjusted by preset ratio,As the difference value;
If the interface direction of the virtual screen is different from the direction of the touch screen, it is determined that non-touch for the first time is satThe difference of the touch coordinate for the first time when pressing event for the first time with generation is marked, and by the difference according to the interface of the virtual screenTowards the direction with the touch screen, after carrying out rotation to the difference and being adjusted by the preset ratio, as describedDifference value.
The embodiment of the present invention, in the touch event for detecting touch screen, however, it is determined that current application program is non-virtual existingReal VR application program, it is determined that the type of the touch event, the touch screen are used to receive the touching instruction of user's input;IfThe type for determining the touch event is to press event for the first time, it is determined that the object that head control cursor is directed toward, and to the head control lightThe object that mark is directed toward carries out respective handling, and the position of the head control cursor within display screen is fixed.The embodiment of the present invention, by withFamily changes the display position of the non-VR application program shown in display screen, by head movement so as to change head control lightThe object being directed toward is marked, then by user by generating touch event after touching on the touchscreen, the touch event is for correct controlObject pointed by cursor carries out respective handling, to be processed the method achieve being thought by head movement discount control cursor directionThen object is accordingly controlled by touch screen, user can accurately determine the object to be operated, so as to bigThe big success rate for improving operation so that user's operation get up it is more convenient.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program productFigure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructionsThe combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programsInstruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produceA raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for realThe device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram orThe function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that countingSeries of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer orThe instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram oneThe step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basicProperty concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted asIt selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the artMind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologiesWithin, then the present invention is also intended to include these modifications and variations.