CN109542494A - A kind of the extension control method and terminal of VR software peripheral hardware - Google Patents
A kind of the extension control method and terminal of VR software peripheral hardware Download PDFInfo
- Publication number
- CN109542494A CN109542494A CN201811220597.5A CN201811220597A CN109542494A CN 109542494 A CN109542494 A CN 109542494A CN 201811220597 A CN201811220597 A CN 201811220597A CN 109542494 A CN109542494 A CN 109542494A
- Authority
- CN
- China
- Prior art keywords
- newly
- control
- peripheral hardware
- software
- increased
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
Abstract
The present invention provides a kind of extension control method of VR software peripheral hardware and terminal, method is the following steps are included: update the configuration file of control module according to newly-increased peripheral hardware, the configuration file includes the corresponding newly-increased dynamic link library file of newly-increased peripheral hardware;After reading the configuration file, according to the newly-increased dynamic link library file in configuration file, the physical control key of newly-increased peripheral hardware and the virtual controlling key of definition are subjected to bindings;According to the corresponding control instruction of physical control key of the peripheral hardware acquired, control operation is carried out to VR software by the virtual controlling key.When the present invention solves existing VR software and needs newly-increased peripheral hardware, need to recompilate software, it is complicated for operation, and the problem of can not support multiple peripheral hardwares while manipulate.
Description
Technical field
The present invention relates to VR software peripheral expansion technical field more particularly to a kind of extension control methods of VR software peripheral hardware
And terminal.
Background technique
VR device manufacturer is more and more at present, and the ununified sdk of various VR peripheral hardwares (external equipment) causes
After VR software development is completed, if it is desired to support is not provided by the VR peripheral hardware of software support before, it is necessary to software
The control module of peripheral hardware modify.
The control module preparation package of more equipment relatively common at present are as follows:
The existing peripheral hardware sdk needed support is docked, i.e., judges sentence (such as if ... else) no in condition
With the docking code in conditional branching, writing different peripheral sdk, as shown in Figure 1;At runtime by being currently at state of activation
Peripheral hardware determines code trend.Such as user's selection is manipulated using HTC VIVE handle, then current activation state can make generation
Code enters into the docking code branch of HTC VIVE sdk;
It when needing to extend other peripheral hardwares, needs to judge that sentence is extended to condition, that is, increases new conditional branching, and
The code for docking new sdk is write in branch, recompilates publication software later.The overall flow of peripheral module design, such as Fig. 2
It is shown;
It is above-mentioned to be primarily present following problems:
1, the code of control module is when needing newly-increased peripheral hardware, it is necessary to modify, it is meant that need to recompilate
Software is replaced installation, the stability decline of software to software.
2, it when newly-increased peripheral hardware, needing to quote new sdk and writes code, control module just needs to rely on new peripheral hardware sdk,
The peripheral hardware type needed support is more, and the sdk of dependence is more, and the degree of coupling of control module can be got higher.
3, the constraint judged by condition, while only a kind of equipment is active, i.e., multiple peripheral hardwares can not be supported same
When manipulate software.
Summary of the invention
The technical problems to be solved by the present invention are: the present invention provides a kind of extension control method of VR software peripheral hardware and
Terminal needs to recompilate software when solving existing VR software and needing newly-increased peripheral hardware, complicated for operation, and can not support more
The problem of a peripheral hardware manipulates simultaneously.
In order to solve the above-mentioned technical problems, the present invention provides a kind of extension control methods of VR software peripheral hardware, including with
Lower step:
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes newly-increased peripheral hardware pair
The newly-increased dynamic link library file answered;
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by newly-increased peripheral hardware
Physical control key and definition virtual controlling key carry out bindings;
S3: according to the corresponding control instruction of physical control key of the peripheral hardware acquired, pass through the virtual controlling key pair
VR software carries out control operation.
The present invention also provides a kind of extension controlling terminal of VR software peripheral hardware, including memory, processor and it is stored in
On reservoir and the computer program that can run on a processor, the processor realize following step when executing the computer program
It is rapid:
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes newly-increased peripheral hardware pair
The newly-increased dynamic link library file answered;
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by newly-increased peripheral hardware
Physical control key and definition virtual controlling key carry out bindings;
S3: according to the corresponding control instruction of physical control key of the peripheral hardware acquired, pass through the virtual controlling key pair
VR software carries out control operation.
The invention has the benefit that
It is soft to update VR when newly-increased peripheral hardware for the extension control method and terminal of a kind of VR software peripheral hardware provided by the invention
The configuration file of part control module, and according to the newly-increased dynamic link library file in configuration file, by the physical control key of peripheral hardware
Bindings are carried out with the virtual controlling key of definition, when acquiring the control instruction of peripheral hardware, by virtual controlling key to VR
Software carries out control operation;The present invention is by the above method, and when needing newly-increased peripheral hardware, control module does not need to modify,
It also means that software does not need to recompilate, does not need to reinstall, new branch can be provided in a manner of incremental update
It holds, the stability of software gets a promotion;It in addition is in newly-increased dynamic link library file to the dependence of newly-increased peripheral hardware control module
In dll, the core code of control module does not depend on any peripheral hardware sdk, and the coupling of module reduces, and independence is improved;
And above-mentioned steps, it solves tradition when writing the docking code of different peripheral sdk by conditional branching, cannot achieve while supporting
Multiple peripheral hardwares carry out the problem of manipulating.
Detailed description of the invention
Fig. 1 is the flow chart of existing VR software peripheral hardware docking in background of invention;
The flow chart of the control module design of existing VR software peripheral hardware in Fig. 2 background of invention;
Fig. 3 is to be illustrated according to a kind of key step of the extension control method of VR software peripheral hardware of the embodiment of the present invention
Figure;
Fig. 4 is the structural schematic diagram according to a kind of extension controlling terminal of VR software peripheral hardware of the embodiment of the present invention;
Label declaration:
1, memory;2, processor.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached
Figure is explained in detail.
The design of most critical of the present invention are as follows: read and increase the corresponding dynamic link library of peripheral hardware in the configuration file of control module newly
The physical control key of peripheral hardware and the virtual controlling key of definition are carried out bindings, and are referred to according to the control acquired by file
It enables, control operation is carried out to VR software by virtual controlling key.
Referring to figure 3., the present invention provides a kind of extension control methods of VR software peripheral hardware, comprising the following steps:
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes newly-increased peripheral hardware pair
The newly-increased dynamic link library file answered;
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by newly-increased peripheral hardware
Physical control key and definition virtual controlling key carry out bindings;
S3: according to the corresponding control instruction of physical control key of the peripheral hardware acquired, pass through the virtual controlling key pair
VR software carries out control operation.
As can be seen from the above description, a kind of extension control method of VR software peripheral hardware provided by the invention, when newly-increased peripheral hardware,
The configuration file of VR software control module is updated, and according to the newly-increased dynamic link library file in configuration file, by the object of peripheral hardware
The virtual controlling key for managing control key and definition carries out bindings, when acquiring the control instruction of peripheral hardware, by virtually controlling
Key processed carries out control operation to VR software;The present invention is by the above method, when needing newly-increased peripheral hardware, control module do not need into
Row modification, is also meaned that software does not need to recompilate, does not need to reinstall, can provided in a manner of incremental update
The stability of new support, software gets a promotion;It in addition is in newly-increased dynamic link to the dependence of newly-increased peripheral hardware control module
In library file dll, the core code of control module does not depend on any peripheral hardware sdk, and the coupling of module reduces, and independence obtains
It improves;And above-mentioned steps, it solves tradition when writing the docking code of different peripheral sdk by conditional branching, cannot achieve together
When support multiple peripheral hardwares carry out the problem of manipulating.
Further, before the S1 further include:
The control logic of the control module of abstract VR software;
According to the control logic, definition controls the virtual controlling key of the VR software, and the virtual controlling key includes void
Quasi- shifting axle and virtual key.
As can be seen from the above description, passing through the above method, it can be achieved that by virtual controlling key control VR software, to realize outer
If passing through virtual controlling key control VR software.
Further, the S1 specifically:
According to the physical control key of newly-increased peripheral hardware, the corresponding relationship between physics control key and virtual controlling key is generated;
According to the corresponding relationship, the realization corresponding with the interface of the control module of VR software and the interface of newly-increased peripheral hardware
Class, compiling generate newly-increased dynamic link library file;
Newly-increased dynamic link library file is copied under the specified read path of control module;
According to the newly-increased dynamic link library file, the configuration file of the control module is updated;The configuration file packet
Include the specified read path.
As can be seen from the above description, when newly-increased peripheral hardware, can effectively be carried out more to configuration file by the above method
Newly, to fast implement support of the VR software to peripheral hardware.
Further, the S2 specifically:
When the starting of VR software, configuration file is parsed by control module, obtains the specified read path;
According to the specified read path, dynamic link library file is increased described in dynamically load newly into memory;
After the completion of the newly-increased dynamic link library file load, according to the newly-increased dynamic link library file, it will increase newly
Peripheral hardware physical control key and definition virtual controlling key carry out bindings.
As can be seen from the above description, by the above method, it can be by the physical control key of peripheral hardware and customized virtual controlling
Key carries out effectively bind, to realize that physical control key carries out control operation to VR software by virtual controlling key.
Further, the S3 specifically:
Receive the control instruction that all peripheral hardwares are sent;
All control instructions being connected to are parsed, multiple mobile control instructions and multiple switch control instruction are obtained;The shifting
Dynamic control instruction includes the corresponding floating point values of moving direction;The switching control instruction includes 0 or 1;
Logic or operation are carried out to multiple switch control instruction, according to logical operation as a result, passing through virtual controlling key pair
VR software carries out switch control;
Algebraical sum operation is carried out to the floating point values for including in multiple mobile control instructions, by the algebraical sum multiplied by preset
Movement speed obtains operation result;According to the operation result, the personage in VR software is moved by virtual controlling key
Control.
As can be seen from the above description, by the above method, control while can be realized multiple peripheral hardwares to VR software.
Referring to figure 4., the present invention also provides a kind of extension controlling terminals of VR software peripheral hardware, including memory 1, processor
2 and it is stored in the computer program that can be run on memory 1 and on processor 2, the processor 2 executes the computer journey
It is performed the steps of when sequence
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes newly-increased peripheral hardware pair
The newly-increased dynamic link library file answered;
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by newly-increased peripheral hardware
Physical control key and definition virtual controlling key carry out bindings;
S3: according to the corresponding control instruction of physical control key of the peripheral hardware acquired, pass through the virtual controlling key pair
VR software carries out control operation.
Further, the extension controlling terminal of a kind of VR software peripheral hardware, before the S1 further include:
The control logic of the control module of abstract VR software;
According to the control logic, definition controls the virtual controlling key of the VR software, and the virtual controlling key includes void
Quasi- shifting axle and virtual key.
Further, the extension controlling terminal of a kind of VR software peripheral hardware, the S1 specifically:
According to the physical control key of newly-increased peripheral hardware, the corresponding relationship between physics control key and virtual controlling key is generated;
According to the corresponding relationship, the realization corresponding with the interface of the control module of VR software and the interface of newly-increased peripheral hardware
Class, compiling generate newly-increased dynamic link library file;
Newly-increased dynamic link library file is copied under the specified read path of control module;
According to the newly-increased dynamic link library file, the configuration file of the control module is updated;The configuration file packet
Include the specified read path.
Further, the extension controlling terminal of a kind of VR software peripheral hardware, the S2 specifically:
When the starting of VR software, configuration file is parsed by control module, obtains the specified read path;
According to the specified read path, dynamic link library file is increased described in dynamically load newly into memory;
After the completion of the newly-increased dynamic link library file load, according to the newly-increased dynamic link library file, it will increase newly
Peripheral hardware physical control key and definition virtual controlling key carry out bindings.
Further, the extension controlling terminal of a kind of VR software peripheral hardware, the S3 specifically:
Receive the control instruction that all peripheral hardwares are sent;
All control instructions being connected to are parsed, multiple mobile control instructions and multiple switch control instruction are obtained;The shifting
Dynamic control instruction includes the corresponding floating point values of moving direction;The switching control instruction includes 0 or 1;
Logic or operation are carried out to multiple switch control instruction, according to logical operation as a result, passing through virtual controlling key pair
VR software carries out switch control;
Algebraical sum operation is carried out to the floating point values for including in multiple mobile control instructions, by the algebraical sum multiplied by preset
Movement speed obtains operation result;According to the operation result, the personage in VR software is moved by virtual controlling key
Control.
Referring to figure 3., the embodiment of the present invention one are as follows:
A kind of extension control method of VR software peripheral hardware provided by the invention, comprising the following steps:
S0: the control logic of the control module of abstract VR software;According to the control logic, definition controls the VR software
Virtual controlling key, the virtual controlling key includes virtual shifting axle and virtual key;
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes newly-increased peripheral hardware pair
The newly-increased dynamic link library file answered;
Wherein, the S1 specifically:
According to the physical control key of newly-increased peripheral hardware, the corresponding relationship between physics control key and virtual controlling key is generated;
According to the corresponding relationship, the realization corresponding with the interface of the control module of VR software and the interface of newly-increased peripheral hardware
Class, compiling generate newly-increased dynamic link library file;
Newly-increased dynamic link library file is copied under the specified read path of control module;
According to the newly-increased dynamic link library file, the configuration file of the control module is updated;The configuration file packet
Include the specified read path.
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by newly-increased peripheral hardware
Physical control key and definition virtual controlling key carry out bindings;
Wherein, the S2 specifically:
When the starting of VR software, configuration file is parsed by control module, obtains the specified read path;
According to the specified read path, dynamic link library file is increased described in dynamically load newly into memory;
After the completion of the newly-increased dynamic link library file load, according to the newly-increased dynamic link library file, it will increase newly
Peripheral hardware physical control key and definition virtual controlling key carry out bindings.
S3: according to the corresponding control instruction of physical control key of the peripheral hardware acquired, pass through the virtual controlling key pair
VR software carries out control operation.
Wherein, the S3 specifically:
Receive the control instruction that all peripheral hardwares are sent;
All control instructions being connected to are parsed, multiple mobile control instructions and multiple switch control instruction are obtained;The shifting
Dynamic control instruction includes the corresponding floating point values of moving direction;The switching control instruction includes 0 or 1;
Logic or operation are carried out to multiple switch control instruction, according to logical operation as a result, passing through virtual controlling key pair
VR software carries out switch control;
Algebraical sum operation is carried out to the floating point values for including in multiple mobile control instructions, by the algebraical sum multiplied by preset
Movement speed obtains operation result;According to the operation result, the personage in VR software is moved by virtual controlling key
Control.
Wherein, preset movement speed is the maximum speed that personage is mobile in VR software;Above-mentioned operation result if more than
Preset movement speed then carries out mobile control by maximum movement speed;
Above-mentioned floating point values then indicates identical as preset direction in [- 1,1] section, if positive value, then if negative value
Indicate with it is preset contrary, preset direction can be set according to the actual situation.
Referring to figure 4., the embodiment of the present invention two are as follows:
A kind of extension controlling terminal of VR software peripheral hardware provided by the invention, including memory 1, processor 2 and be stored in
On memory 1 and the computer program that can be run on processor 2, the realization when processor 2 executes the computer program
Following steps:
S0: the control logic of the control module of abstract VR software;According to the control logic, definition controls the VR software
Virtual controlling key, the virtual controlling key includes virtual shifting axle and virtual key;
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes newly-increased peripheral hardware pair
The newly-increased dynamic link library file answered;
Wherein, the S1 specifically:
According to the physical control key of newly-increased peripheral hardware, the corresponding relationship between physics control key and virtual controlling key is generated;
According to the corresponding relationship, the realization corresponding with the interface of the control module of VR software and the interface of newly-increased peripheral hardware
Class, compiling generate newly-increased dynamic link library file;
Newly-increased dynamic link library file is copied under the specified read path of control module;
According to the newly-increased dynamic link library file, the configuration file of the control module is updated;The configuration file packet
Include the specified read path.
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by newly-increased peripheral hardware
Physical control key and definition virtual controlling key carry out bindings;
Wherein, the S2 specifically:
When the starting of VR software, configuration file is parsed by control module, obtains the specified read path;
According to the specified read path, dynamic link library file is increased described in dynamically load newly into memory;
After the completion of the newly-increased dynamic link library file load, according to the newly-increased dynamic link library file, it will increase newly
Peripheral hardware physical control key and definition virtual controlling key carry out bindings.
S3: according to the corresponding control instruction of physical control key of the peripheral hardware acquired, pass through the virtual controlling key pair
VR software carries out control operation.
Wherein, the S3 specifically:
Receive the control instruction that all peripheral hardwares are sent;
All control instructions being connected to are parsed, multiple mobile control instructions and multiple switch control instruction are obtained;The shifting
Dynamic control instruction includes the corresponding floating point values of moving direction;The switching control instruction includes 0 or 1;
Logic or operation are carried out to multiple switch control instruction, according to logical operation as a result, passing through virtual controlling key pair
VR software carries out switch control;
Algebraical sum operation is carried out to the floating point values for including in multiple mobile control instructions, by the algebraical sum multiplied by preset
Movement speed obtains operation result;According to the operation result, the personage in VR software is moved by virtual controlling key
Control.
Wherein, preset movement speed is the maximum speed that personage is mobile in VR software;Above-mentioned operation result if more than
Preset movement speed then carries out mobile control by maximum movement speed;
Above-mentioned floating point values then indicates identical as preset direction in [- 1,1] section, if positive value, then if negative value
Indicate with it is preset contrary, preset direction can be set according to the actual situation, above-mentioned floating point values algebraical sum operation,
Only when moving direction is in same straight line, operation can be carried out.
The embodiment of the present invention three are as follows:
1, assume to specify the corresponding dynamic link library file dll of 2 kinds of peripheral hardwares and reality in configuration file input.config
Existing class name, is HtcVIVE.dll (Target4Htc class) and Oculus.dll (Target4Oculus class) respectively.
1.1, when software starts, control module parse know to after this file from specified directory
StreamingAssets Input under dynamically load HtcVIVE.dll and Oculus.dll, dll dynamically load into after memory,
Application program can use the class in dll.
1.2, after the completion of dynamically load, Target4Htc class Target4Oculus is instantiated according to the class name of configuration file
Class obtains instance object, later carries out Target4Htc object and Target4Oculus object and each virtual shifting axle
Binding, binding here are completed in this way:
A.Target4Htc class Target4Oculus class all realizes ITarget interface, and ITarget defines some obtain
The method for taking equipment input value, such as obtain whether current key is pressed;Whether key bounces, by ITarget interface, virtually
The input value of the physical button of the available peripheral hardware of key;By the floating-point values in control instruction, connect using ITarget
Mouthful, virtual shifting axle can obtain the input value of real world devices.
B. each virtual shifting axle/virtual key has a corresponding list, and what is stored in this list is all
ITarget interface realizes class object.
C. Target4Htc object and Target4Oculus object are added in the list, complete bindings.Work as void
When quasi- shifting axle needs to obtain real peripheral hardware input value, so that it may by the list, call each ITarget interface in the list
The method for realizing class object is realized, the input value of corresponding peripheral hardware is obtained.
About being described as follows for step B and C, each virtual shifting axle contain an interface realize class list List <
ITarget > bindingList, and Target4Htc class Target4Oculus class all realizes ITarget interface, so that it may it is logical
Target4Htc object and Target4Oculus object are added in the list by the mode for crossing bindingList.Add, complete
Bindings.
2, assume the value for needing to obtain some virtual shifting axle in the somewhere logic of control module:
2.1, if it is desired to whether detection virtual key [shooting] presses, virtual key [shooting] can be realized from its interface
The GetButtonDown method that all ITarget interfaces realize class is traversed in class list, is obtained multiple bool return values and (is obtained
The control instruction obtained includes multiple bool return values), then carry out boolean or operation, that is to say, that as long as there is an interface
The method for realizing class returns to true, then will determine that virtual shifting axle [shooting] returns to true, that is, is pressed.
2.2, if it is desired to obtaining the floating point values of virtual shifting axle [back-and-forth motion], virtual shifting axle [back-and-forth motion] can be from
Its interface, which is realized, traverses the GetAxis method that all ITarget interfaces realize class in class list, obtain multiple float floating-points
Return value (control instruction acquired includes multiple float floating-point return values), then carry out plus operation after carry out again [-
1,1] limit value operation in section obtains the aggregate value of more equipment input values, that is to say, that the return value of virtual shifting axle [back-and-forth motion]
There are multiple peripheral hardwares to codetermine;
If only operating a peripheral hardware, direction is determined by the input of this peripheral hardware, it is assumed that player shifts peripheral hardware axis onto front
The position of half, then the input value that thus peripheral hardware sdk is obtained is 0.5, then by 0.5 multiplied by the mobile speed of the maximum set in game
Degree (if being 5m/s), then the personage in game finally will be with the forward movement of the speed of 2.5m/s;Assuming that player shifts axis onto
The position of bottom-rear, then input value is -1, and similarly personage will finally be moved backward with the speed of 5m/s.
If operating 2 peripheral hardwares simultaneously and direction being different, a peripheral hardware input value returns to -1, another peripheral hardware input value is returned
Return 1, then carry out plus operation after carry out again [- 1,1] section limit value operation final result be 0, then without athletic performance;If
It operates 2 peripheral hardwares simultaneously and direction is all that forward, i.e., two peripheral hardware input values all return to 1, then carried out again after adding operation
[- 1,1] section limit value operation final result is 1, multiplied by the maximum movement speed (if being 5m/s) set in game, then
Personage in game finally will be with the forward movement of the speed of 5m/s.
In conclusion the extension control method and terminal of a kind of VR software peripheral hardware provided by the invention, when newly-increased peripheral hardware,
The configuration file of VR software control module is updated, and according to the newly-increased dynamic link library file in configuration file, by the object of peripheral hardware
The virtual controlling key for managing control key and definition carries out bindings, when acquiring the control instruction of peripheral hardware, by virtually controlling
Key processed carries out control operation to VR software;The present invention is by the above method, when needing newly-increased peripheral hardware, control module do not need into
Row modification, is also meaned that software does not need to recompilate, does not need to reinstall, can provided in a manner of incremental update
The stability of new support, software gets a promotion;It in addition is in newly-increased dynamic link to the dependence of newly-increased peripheral hardware control module
In library file dll, the core code of control module does not depend on any peripheral hardware sdk, and the coupling of module reduces, and independence obtains
It improves;And above-mentioned steps, it solves tradition when writing the docking code of different peripheral sdk by conditional branching, cannot achieve together
When support multiple peripheral hardwares carry out the problem of manipulating.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in other relevant technical fields, similarly
It is included within the scope of the present invention.
Claims (10)
1. a kind of extension control method of VR software peripheral hardware, which comprises the following steps:
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes that newly-increased peripheral hardware is corresponding
Newly-increased dynamic link library file;
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by the object of newly-increased peripheral hardware
The virtual controlling key for managing control key and definition carries out bindings;
S3: soft to VR by the virtual controlling key according to the corresponding control instruction of physical control key of the peripheral hardware acquired
Part carries out control operation.
2. a kind of extension control method of VR software peripheral hardware according to claim 1, which is characterized in that before the S1 also
Include:
The control logic of the control module of abstract VR software;
According to the control logic, definition controls the virtual controlling key of the VR software, and the virtual controlling key includes virtual moves
Moving axis and virtual key.
3. a kind of extension control method of VR software peripheral hardware according to claim 1, which is characterized in that the S1 is specific
Are as follows:
According to the physical control key of newly-increased peripheral hardware, the corresponding relationship between physics control key and virtual controlling key is generated;
According to the corresponding relationship, newly-increased peripheral hardware realization class corresponding with the interface of the control module of VR software and the interface,
Compiling generates newly-increased dynamic link library file;
Newly-increased dynamic link library file is copied under the specified read path of control module;
According to the newly-increased dynamic link library file, the configuration file of the control module is updated;The configuration file includes institute
State specified read path.
4. a kind of extension control method of VR software peripheral hardware according to claim 3, which is characterized in that the S2 is specific
Are as follows:
When the starting of VR software, configuration file is parsed by control module, obtains the specified read path;
According to the specified read path, dynamic link library file is increased described in dynamically load newly into memory;
After the completion of the newly-increased dynamic link library file load, according to the newly-increased dynamic link library file, outside newly-increased
If physical control key and definition virtual controlling key carry out bindings.
5. a kind of extension control method of VR software peripheral hardware according to claim 1, which is characterized in that the S3 is specific
Are as follows:
Receive the control instruction that all peripheral hardwares are sent;
All control instructions being connected to are parsed, multiple mobile control instructions and multiple switch control instruction are obtained;The mobile control
System instruction includes the corresponding floating point values of moving direction;The switching control instruction includes 0 or 1;
Logic or operation are carried out to multiple switch control instruction, according to logical operation as a result, soft to VR by virtual controlling key
Part carries out switch control;
Algebraical sum operation is carried out to the floating point values for including in multiple mobile control instructions, by the algebraical sum multiplied by preset movement
Speed obtains operation result;According to the operation result, mobile control is carried out to the personage in VR software by virtual controlling key
System.
6. a kind of extension controlling terminal of VR software peripheral hardware, including memory, processor and storage on a memory and can located
The computer program run on reason device, which is characterized in that the processor performs the steps of when executing the computer program
S1: the configuration file of control module is updated according to newly-increased peripheral hardware, the configuration file includes that newly-increased peripheral hardware is corresponding
Newly-increased dynamic link library file;
S2: after reading the configuration file, according to the newly-increased dynamic link library file in configuration file, by the object of newly-increased peripheral hardware
The virtual controlling key for managing control key and definition carries out bindings;
S3: soft to VR by the virtual controlling key according to the corresponding control instruction of physical control key of the peripheral hardware acquired
Part carries out control operation.
7. a kind of extension controlling terminal of VR software peripheral hardware according to claim 6, which is characterized in that before the S1 also
Include:
The control logic of the control module of abstract VR software;
According to the control logic, definition controls the virtual controlling key of the VR software, and the virtual controlling key includes virtual moves
Moving axis and virtual key.
8. a kind of extension controlling terminal of VR software peripheral hardware according to claim 6, which is characterized in that the S1 is specific
Are as follows:
According to the physical control key of newly-increased peripheral hardware, the corresponding relationship between physics control key and virtual controlling key is generated;
According to the corresponding relationship, newly-increased peripheral hardware realization class corresponding with the interface of the control module of VR software and the interface,
Compiling generates newly-increased dynamic link library file;
Newly-increased dynamic link library file is copied under the specified read path of control module;
According to the newly-increased dynamic link library file, the configuration file of the control module is updated;The configuration file includes institute
State specified read path.
9. a kind of extension controlling terminal of VR software peripheral hardware according to claim 8, which is characterized in that the S2 is specific
Are as follows:
When the starting of VR software, configuration file is parsed by control module, obtains the specified read path;
According to the specified read path, dynamic link library file is increased described in dynamically load newly into memory;
After the completion of the newly-increased dynamic link library file load, according to the newly-increased dynamic link library file, outside newly-increased
If physical control key and definition virtual controlling key carry out bindings.
10. a kind of extension controlling terminal of VR software peripheral hardware according to claim 6, which is characterized in that the S3 is specific
Are as follows:
Receive the control instruction that all peripheral hardwares are sent;
All control instructions being connected to are parsed, multiple mobile control instructions and multiple switch control instruction are obtained;The mobile control
System instruction includes the corresponding floating point values of moving direction;The switching control instruction includes 0 or 1;
Logic or operation are carried out to multiple switch control instruction, according to logical operation as a result, soft to VR by virtual controlling key
Part carries out switch control;
Algebraical sum operation is carried out to the floating point values for including in multiple mobile control instructions, by the algebraical sum multiplied by preset movement
Speed obtains operation result;According to the operation result, mobile control is carried out to the personage in VR software by virtual controlling key
System.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811220597.5A CN109542494B (en) | 2018-10-19 | 2018-10-19 | Extension control method and terminal for VR software peripheral |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811220597.5A CN109542494B (en) | 2018-10-19 | 2018-10-19 | Extension control method and terminal for VR software peripheral |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109542494A true CN109542494A (en) | 2019-03-29 |
CN109542494B CN109542494B (en) | 2021-11-05 |
Family
ID=65844406
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811220597.5A Active CN109542494B (en) | 2018-10-19 | 2018-10-19 | Extension control method and terminal for VR software peripheral |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109542494B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110502283A (en) * | 2019-08-19 | 2019-11-26 | 深圳大趋智能科技有限公司 | A kind of product peripheral hardware compatibility method and system |
CN112862978A (en) * | 2020-12-31 | 2021-05-28 | 江西格灵如科科技有限公司 | VR courseware terminal and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130047071A (en) * | 2011-10-31 | 2013-05-08 | 삼성에스디에스 주식회사 | Apparatus and method for developing mixed reality application for mobile terminal |
CN103645928A (en) * | 2013-12-06 | 2014-03-19 | 浪潮(北京)电子信息产业有限公司 | Software function module processing method and system |
CN105760196A (en) * | 2016-02-18 | 2016-07-13 | 福建天晴数码有限公司 | Detection method and system for pluggable plug-in program |
CN106502737A (en) * | 2016-10-20 | 2017-03-15 | 广州酷狗计算机科技有限公司 | A kind of method and terminal for improving application program launching speed |
-
2018
- 2018-10-19 CN CN201811220597.5A patent/CN109542494B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130047071A (en) * | 2011-10-31 | 2013-05-08 | 삼성에스디에스 주식회사 | Apparatus and method for developing mixed reality application for mobile terminal |
CN103645928A (en) * | 2013-12-06 | 2014-03-19 | 浪潮(北京)电子信息产业有限公司 | Software function module processing method and system |
CN105760196A (en) * | 2016-02-18 | 2016-07-13 | 福建天晴数码有限公司 | Detection method and system for pluggable plug-in program |
CN106502737A (en) * | 2016-10-20 | 2017-03-15 | 广州酷狗计算机科技有限公司 | A kind of method and terminal for improving application program launching speed |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110502283A (en) * | 2019-08-19 | 2019-11-26 | 深圳大趋智能科技有限公司 | A kind of product peripheral hardware compatibility method and system |
CN112862978A (en) * | 2020-12-31 | 2021-05-28 | 江西格灵如科科技有限公司 | VR courseware terminal and system |
Also Published As
Publication number | Publication date |
---|---|
CN109542494B (en) | 2021-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Kim et al. | Macsim: A cpu-gpu heterogeneous simulation framework user guide | |
JP4231516B2 (en) | Execution code generation method and program | |
CN100555218C (en) | Be used to improve the apparatus and method of the simulation velocity of the middle-and-high-ranking language of analogue system on the sheet | |
US8473269B1 (en) | System-level hardware and software development and co-simulation system | |
EP2494454A1 (en) | Two way communication support for heterogenous processors of a computer platform | |
EA004196B1 (en) | Control program product and data processing system | |
US20090125888A1 (en) | Expression-level debugging without format changes | |
US8997042B2 (en) | Flexible and run-time-modifiable inclusion of functionality in computer code | |
CN109542494A (en) | A kind of the extension control method and terminal of VR software peripheral hardware | |
CN103793208B (en) | The data handling system of vector dsp processor and coprocessor Collaboration | |
US9244652B1 (en) | State management for task queues | |
CN108345458A (en) | A kind of call method and system of static compilation language and script | |
CN112445540B (en) | Program running method, system, terminal and storage medium | |
Moir et al. | The Adaptive Transactional Memory Test Platform: A tool for experimenting with transactional code for Rock | |
CN112099853A (en) | RISC-V processor, FPGA chip and system on chip based on FPGA | |
CN113810402B (en) | Multi-protocol adaptation method and system, computer device, storage medium | |
CN112346390B (en) | Optical module control method, device, equipment and computer readable storage medium | |
CN113535129A (en) | Method and system for programming over-program nodes | |
US7124311B2 (en) | Method for controlling processor in active/standby mode by third decoder based on instructions sent to a first decoder and the third decoder | |
JP2011516970A (en) | Operating system fast execution command | |
CN109977024A (en) | The cpu chip emulator for supporting NVM to download in real time | |
CN111061460B (en) | Universal software development platform based on embedded system | |
CN104641347A (en) | Function call method and device, and terminal equipment | |
KR100658485B1 (en) | Microprocessor development system | |
CN105022653A (en) | Inspection method for template library programming conventions |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |