CN108320315A - View switching method, device, computer equipment and storage medium - Google Patents

View switching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108320315A
CN108320315A CN201810114128.9A CN201810114128A CN108320315A CN 108320315 A CN108320315 A CN 108320315A CN 201810114128 A CN201810114128 A CN 201810114128A CN 108320315 A CN108320315 A CN 108320315A
Authority
CN
China
Prior art keywords
interface
dimensional
stroke
dimentional
view
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810114128.9A
Other languages
Chinese (zh)
Inventor
邬如俊
张颖
冯敏
马宁
熊志勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Digital Life Technology Co Ltd
Original Assignee
CENTURY DRAGON INFORMATION NETWORK Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CENTURY DRAGON INFORMATION NETWORK Co Ltd filed Critical CENTURY DRAGON INFORMATION NETWORK Co Ltd
Priority to CN201810114128.9A priority Critical patent/CN108320315A/en
Publication of CN108320315A publication Critical patent/CN108320315A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

This application involves a kind of view switching method, system, computer equipment and storage mediums.This method includes:Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are in advance the two-dimentional two-dimentional rendering camera of interface setting, three-dimensional rendering camera is arranged for Three Dimensional Interface;Two-dimentional rendering camera is opened, shows two-dimentional interface, and obtains stroke and draws operation;Operation is being drawn while drawing planar graph on two-dimentional interface according to stroke, and operation drawing three-dimensional model on Three Dimensional Interface is drawn according to stroke;When getting switching 3-D view instruction, two-dimentional rendering camera is closed, three-dimensional rendering camera is opened, shows the threedimensional model on Three Dimensional Interface.During what the planar graph of two dimension view was converted that the process of the threedimensional model of 3-D view needs by above-mentioned view switching method be dispersed in total time every little step is rapid, when two dimension view is switched to 3-D view, it only needs to switch corresponding display camera, the required time is almost nil, reduces view switching time.

Description

View switching method, device, computer equipment and storage medium
Technical field
This application involves technical field of image processing, more particularly to a kind of view switching method, device, computer equipment And storage medium.
Background technology
Two dimension view shows to be planar graph, and 3-D view shows to be threedimensional model, two dimension view is switched to three When dimensional view, it is often necessary to the planar graph of two dimension view be converted to the threedimensional model of 3-D view, process needs certain Transformation time, and planar graph is more complicated, it is longer that planar graph is converted into the threedimensional model time, and two dimension view is caused to be switched to The switching time of 3-D view is relatively long, and switching efficiency is low.
For example, in house ornamentation software, the plane floor plan for first drawing house under two dimension view, regeneration three are generally required Threedimensional model under dimensional view could have house a comprehensive understanding by plane floor plan and threedimensional model, but by two When dimensional view is switched to 3-D view, the process that the plane floor plan of two dimension view is converted to the threedimensional model of 3-D view needs Regular hour, and the house type in house is more complicated, transformation time is longer, when two dimension view being caused to be switched to the switching of 3-D view Between it is relatively long, switching efficiency is low.
Invention content
Based on this, it is necessary to which the switching time for being switched to 3-D view for two dimension view is relatively long, and switching efficiency is low Under technical problem, a kind of view switching method, device, computer equipment and storage medium are provided.
A kind of view switching method, includes the following steps:
Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are in advance the two-dimentional interface setting two dimension Three-dimensional rendering camera is arranged for the Three Dimensional Interface in rendering camera;
The two-dimentional rendering camera is opened, shows the two-dimentional interface, and obtain stroke and draw operation;
Operation is being drawn according to the stroke while drawing planar graph on the two-dimentional interface, according to the stroke Draw operation drawing three-dimensional model on the Three Dimensional Interface;
When getting switching 3-D view instruction, the two-dimentional rendering camera is closed, the three-dimensional rendering camera is opened, Show the threedimensional model on the Three Dimensional Interface.
It is described in one of the embodiments, that plan view is drawn on the two-dimentional interface according to stroke drafting operation The step of shape, includes the following steps:
The apex coordinate that operation obtains each stroke is drawn according to the stroke;
According to the apex coordinate of each stroke planar graph is generated in the corresponding coordinate points in the two dimension interface.
It is described in one of the embodiments, that operation drawing three-dimensional mould on the Three Dimensional Interface is drawn according to the stroke The step of type, includes the following steps:
The apex coordinate that operation obtains each stroke is drawn according to the stroke;
Preset height is obtained, according to the apex coordinate of each stroke and the preset height in the Three Dimensional Interface pair The coordinate points answered generate threedimensional model.
In one of the embodiments, after the step of display threedimensional model, include the following steps:
When getting switching two dimension view instruction, the three-dimensional rendering camera is closed, opens the two-dimentional rendering camera, Show the planar graph on the two-dimentional interface.
A kind of view switching device, including:
Interface setup module, for two-dimentional interface and Three Dimensional Interface to be arranged under Same Scene, wherein be in advance described The two-dimentional two-dimentional rendering camera of interface setting, is arranged three-dimensional rendering camera for the Three Dimensional Interface;
Operation acquisition module is drawn, the two-dimentional rendering camera is used to open, shows the two-dimentional interface, and obtain stroke Draw operation;
Image collection module, for drawing operation drafting planar graph on the two-dimentional interface according to the stroke Meanwhile operation drawing three-dimensional model on the Three Dimensional Interface is drawn according to the stroke;
View handover module, for when getting switching 3-D view instruction, closing the two-dimentional rendering camera, opening The three-dimensional rendering camera shows the threedimensional model on the Three Dimensional Interface.
Described image acquisition module further includes planar graph acquiring unit in one of the embodiments,;
The planar graph acquiring unit, for drawing the apex coordinate that operation obtains each stroke according to the stroke;Root According to the apex coordinate of each stroke planar graph is generated in the corresponding coordinate points in the two dimension interface.
Described image acquisition module further includes obtaining three-dimensional model unit in one of the embodiments,;
The obtaining three-dimensional model unit, for drawing the apex coordinate that operation obtains each stroke according to the stroke;It obtains Preset height is taken, according to the apex coordinate of each stroke and the preset height in the corresponding coordinate points of the Three Dimensional Interface Generate threedimensional model.
The view handover module is additionally operable to when getting switching two dimension view instruction in one of the embodiments, The three-dimensional rendering camera is closed, the two-dimentional rendering camera is opened, shows the planar graph on the two-dimentional interface.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device realizes following steps when executing the computer program:
Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are in advance the two-dimentional interface setting two dimension Three-dimensional rendering camera is arranged for the Three Dimensional Interface in rendering camera;
The two-dimentional rendering camera is opened, shows the two-dimentional interface, and obtain stroke and draw operation;
Operation is being drawn according to the stroke while drawing planar graph on the two-dimentional interface, according to the stroke Draw operation drawing three-dimensional model on the Three Dimensional Interface;
When getting switching 3-D view instruction, the two-dimentional rendering camera is closed, the three-dimensional rendering camera is opened, Show the threedimensional model on the Three Dimensional Interface.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized when row:
Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are in advance the two-dimentional interface setting two dimension Three-dimensional rendering camera is arranged for the Three Dimensional Interface in rendering camera;
The two-dimentional rendering camera is opened, shows the two-dimentional interface, and obtain stroke and draw operation;
Operation is being drawn according to the stroke while drawing planar graph on the two-dimentional interface, according to the stroke Draw operation drawing three-dimensional model on the Three Dimensional Interface;
When getting switching 3-D view instruction, the two-dimentional rendering camera is closed, the three-dimensional rendering camera is opened, Show the threedimensional model on the Three Dimensional Interface.
Above-mentioned view switching method, device, computer equipment and storage medium are grasped by drawing the stroke acquired Make in two-dimentional interface and the corresponding image of Three Dimensional Interface parallel generation, the planar graph of two dimension view is converted into 3-D view What the process of threedimensional model needed is dispersed in each stroke operation total time, when two dimension view is switched to 3-D view When, it is only necessary to the corresponding display camera of switching, switching time is almost nil, when reduction two dimension view is switched to 3-D view switching Between, improve switching efficiency.
Description of the drawings
Fig. 1 is the applied environment figure of view switching method in one embodiment of the invention;
Fig. 2 is the flow chart of view switching method in one embodiment of the invention;
Fig. 3 is the flow chart of view switching method in another embodiment of the present invention;
Fig. 4 is the schematic diagram of two-dimentional interface and Three Dimensional Interface in one embodiment of the invention Scene;
Fig. 5 is the structural schematic diagram of view switching device in one embodiment of the invention;
Fig. 6 is the structural schematic diagram of view switching device in one embodiment of the invention;
Fig. 7 is the internal structure chart of one embodiment of the invention Computer equipment.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
View switching method provided by the present application, can be applied in terminal as shown in Figure 1.Including passing through system bus Processor, memory, network interface, display screen and the input unit of connection.Wherein, the memory of the computer equipment includes non- Volatile storage medium, built-in storage.The memory of the terminal is stored with operating system, further includes a kind of view switching application system System, the view switch application system for realizing a kind of view switching method.The processor is calculated for offer and control ability, Support entire terminal operating.The input unit of the computer equipment can be the touch layer covered on display screen, can also be meter The button or Trackpad being arranged on machine equipment shell are calculated, can also be external keyboard, Trackpad or mouse etc., is used for obtaining The stroke at family draws operation or view switching command;The display screen of the computer equipment can be liquid crystal display or electronics Ink display screen, for showing the image under different views.It is grasped specifically, the stroke acquired by input unit is drawn Make the three-dimensional model in the two-dimensional planar graph of parallel generation and three-dimensional, when receiving view switching command, needing will be two-dimentional When view is switched to 3-D view, it is only necessary to which the corresponding display camera of switching shows three-dimensional three-dimensional model by display screen. Wherein, terminal includes but not limited to the equipment such as computer, smart mobile phone, tablet computer.
It is the flow chart of view switching method in one embodiment of the invention referring to Fig. 2, Fig. 2.In the present embodiment, view is cut Method is changed, is included the following steps:
Step 210:Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are arranged in advance for two-dimentional interface Three-dimensional rendering camera is arranged for Three Dimensional Interface in two-dimentional rendering camera.
In this step, two-dimentional interface and Three Dimensional Interface are set under Same Scene, to ensure two-dimentional interface and three-dimensional The data sharing of program;Rendering camera is the equipment that can capture simultaneously display interface epigraph, at two-dimentional interface and three It ties up the corresponding rendering camera of setting on interface to render, each rendering camera can capture and show the image on corresponding interface.
Step 220:Two-dimentional rendering camera is opened, shows two-dimentional interface, and obtains stroke and draws operation.
In this step, stroke draws the operation that operation is graphing, may include multiple sequence strokes, can also include An independent stroke, wherein stroke can be a lines, can also be a shape.
Specifically, opening two-dimentional rendering camera, shows two-dimentional interface, Image Rendering is carried out under two dimension view, obtain figure Each stroke in shape drawing process.
Step 230:Operation is being drawn while drawing planar graph on two-dimentional interface according to stroke, is being drawn according to stroke Operation drawing three-dimensional model on Three Dimensional Interface.
Each stroke operation in graphics rendering process is obtained under two dimension view, is operated two according to each stroke The planar graph that a two dimension view is generated on interface is tieed up, meanwhile, it is operated according to each stroke, is generated on Three Dimensional Interface Threedimensional model under one 3-D view, that is to say, that in two dimension view, some pictures are often drawn on two-dimentional interface, all can Generated in real time on Three Dimensional Interface corresponding threedimensional model,
Step 240:When getting switching 3-D view instruction, two-dimentional rendering camera is closed, three-dimensional rendering camera is opened, Show the threedimensional model on Three Dimensional Interface.
After receiving the instruction of switch view, by closing two-dimentional rendering camera, three-dimensional rendering camera is opened, is stopped aobvious Show the planar graph under two dimension view.It shows the threedimensional model under 3-D view, completes view handover operation.
Above-mentioned view switching method, by by the stroke acquired draw operation two-dimentional interface and Three Dimensional Interface simultaneously Row generates corresponding image, and the planar graph of two dimension view is converted to the total time that the process of the threedimensional model of 3-D view needs It is dispersed in each stroke operation, when two dimension view is switched to 3-D view, it is only necessary to the corresponding display camera of switching, Switching time is almost nil, reduces two dimension view and is switched to 3-D view switching time, improves switching efficiency.
Operation is drawn the step of drawing planar graph on two-dimentional interface according to stroke in one of the embodiments, packet Include following steps:The apex coordinate that operation obtains each stroke is drawn according to stroke;According to the apex coordinate of each stroke on two-dimentional boundary The corresponding coordinate points in face generate planar graph.
In the present embodiment, obtains stroke and draw in operation after the apex coordinate of each stroke, it is corresponding on two-dimentional interface Coordinate points on generate each corresponding planar graph of stroke.
For example, in stroke draws operation, one stroke therein is lines, obtains the coordinate of the lines two-end-point Afterwards, corresponding two coordinate points generate a lines on two-dimentional interface.
Operation is drawn the drawing three-dimensional model on Three Dimensional Interface the step of according to stroke in one of the embodiments, packet Include following steps:The apex coordinate that operation obtains each stroke is drawn according to stroke;Preset height is obtained, according to the vertex of each stroke Coordinate and preset height generate threedimensional model in the corresponding coordinate points of Three Dimensional Interface.
Stroke is obtained to draw in operation after the apex coordinate of each stroke, it is raw in corresponding coordinate points on Three Dimensional Interface At each corresponding three-dimensional stereo model of stroke, wherein the height value of three-dimensional stereo model is preset height.
After the step of showing threedimensional model in one of the embodiments, include the following steps:Getting switching two When dimensional view instructs, three-dimensional rendering camera is closed, opens two-dimentional rendering camera, shows the planar graph on two-dimentional interface.
After receiving the instruction of switch view, by closing three-dimensional rendering camera, two-dimentional rendering camera is opened, is stopped aobvious Show the planar graph under 3-D view.It shows the threedimensional model under two dimension view, completes 3-D view and switch behaviour to two dimension view Make.In the present embodiment, it is only necessary to which view switching can be completed in the corresponding display camera of switching, and switching time is almost nil, reduces View switching time improves switching efficiency.
It is the flow chart of view switching method in another embodiment of the present invention referring to Fig. 3, Fig. 3;In the present embodiment, view Switching method includes the following steps:
Step 310:Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are arranged in advance for two-dimentional interface Three-dimensional rendering camera is arranged for Three Dimensional Interface in two-dimentional rendering camera.
In this step, camera is the equipment that can capture simultaneously display interface epigraph, in two-dimentional interface and three-dimensional Corresponding camera is arranged on interface to render so that camera can capture and show the image on corresponding interface;Under Same Scene The two-dimentional interface of setting and Three Dimensional Interface, ensure that the data sharing of two-dimentional interface and three-dimensional program.
Specifically, being based on unity3D game engines, two-dimentional interface and Three Dimensional Interface are set in one scenario, and set Set corresponding camera.Referring to Fig. 4, two-dimentional interface 430 and Three Dimensional Interface 460 are set in a scene 410, pass through two-dimentional wash with watercolours Dye camera 420 can show that the planar graph 440 on two-dimentional interface 430, planar graph 440 are two dimension view;Pass through three-dimensional wash with watercolours Dye camera 450 can show that the three-dimensional stereo model 470 on Three Dimensional Interface 460, three-dimensional stereo model 470 are 3-D view.
Step 320:Two-dimentional rendering camera is opened, shows two-dimentional interface, and obtains stroke and draws operation.
Two-dimentional rendering camera is opened, two-dimentional interface is shown, Image Rendering is carried out under two dimension view, obtain graphic plotting mistake Each stroke in journey.
Step 330:The apex coordinate that operation obtains each stroke is drawn according to stroke.
Each stroke operation in graphics rendering process is obtained under two dimension view, obtains the top for the stroke for recording each Point coordinates Points, and this group of apex coordinate Points is sent to two-dimentional interface and Three Dimensional Interface simultaneously.
Step 340:According to the apex coordinate of each stroke planar graph is generated in the corresponding coordinate points in two-dimentional interface.
It acquires stroke to draw in operation after the apex coordinate of each stroke, the corresponding coordinate points on two-dimentional interface The each corresponding planar graph of stroke of upper generation.Specifically, two-dimentional interface is by calling CreateMesh (Points) function Generate planar graph.
Step 350:Preset height is obtained, according to the apex coordinate of each stroke, preset height in the corresponding seat of Three Dimensional Interface Punctuate generates the threedimensional model of preset height.
It acquires stroke to draw in operation after the apex coordinate of each stroke, the corresponding coordinate points on Three Dimensional Interface It is upper to generate corresponding three-dimensional model.
Specifically, Three Dimensional Interface generates three-dimensional model by calling Create3DMesh (Points, height) function, In, height is height, can be software default height value, can also be user according to actual conditions setting value.
Step 360:When getting switching 3-D view instruction, two-dimentional rendering camera is closed, three-dimensional rendering camera is opened, Show the threedimensional model on Three Dimensional Interface.
Above-mentioned view switching method, by by the stroke acquired draw operation two-dimentional interface and Three Dimensional Interface simultaneously Row generates corresponding image, and the planar graph of two dimension view is converted to the total time that the process of the threedimensional model of 3-D view needs It is dispersed in each stroke operation, when two dimension view is switched to 3-D view, it is only necessary to the corresponding display camera of switching, Switching time is almost nil, reduces two dimension view and is switched to 3-D view switching time, improves switching efficiency.
It should be understood that although each step in the flow chart of Fig. 2 or Fig. 3 is shown successively according to the instruction of arrow, But these steps are not the inevitable sequence indicated according to arrow to be executed successively.Unless expressly state otherwise herein, these There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, in Fig. 2 or Fig. 3 At least part step may include that either these sub-steps of multiple stages or stage are not necessarily same to multiple sub-steps One moment executed completion, but can execute at different times, and the execution in these sub-steps or stage sequence is also not necessarily Be carry out successively, but can with other steps either the sub-step of other steps or at least part in stage in turn or Alternately execute.
It is the structural schematic diagram of view switching device in one embodiment of the invention referring to Fig. 5, Fig. 5;In the present embodiment, depending on Figure switching device, including:
Interface setup module 510, for two-dimentional interface and Three Dimensional Interface to be arranged under Same Scene, wherein be in advance The two-dimentional two-dimentional rendering camera of interface setting, is arranged three-dimensional rendering camera for Three Dimensional Interface;
Operation acquisition module 520 is drawn, two-dimentional rendering camera is used to open, shows two-dimentional interface, and obtains stroke drafting Operation;
Image collection module 530, for drawing operation while drawing planar graph on two-dimentional interface according to stroke, Operation drawing three-dimensional model on Three Dimensional Interface is drawn according to stroke;
View handover module 540, for when getting switching 3-D view instruction, closing two-dimentional rendering camera, opening Three-dimensional rendering camera shows the threedimensional model on Three Dimensional Interface.
Above-mentioned view switching device will be two-dimentional by two-dimentional interface and the corresponding image of Three Dimensional Interface parallel generation View planar graph conversion 3-D view threedimensional model process need be dispersed in total time every little step it is rapid in, when two It is almost nil that dimensional view is switched to required time when 3-D view, when reducing two dimension view and being switched to 3-D view switching Between, improve switching efficiency.
It is the structural schematic diagram of view switching device in another embodiment of the present invention referring to Fig. 6, Fig. 6;In the present embodiment, Image collection module further includes planar graph acquiring unit 531;Planar graph acquiring unit 531 is used to be drawn according to stroke and operate Obtain the apex coordinate of each stroke;According to the apex coordinate of each stroke planar graph is generated in the corresponding coordinate points in two-dimentional interface.
Image collection module further includes obtaining three-dimensional model unit 532 in one of the embodiments,;Obtaining three-dimensional model Unit 532 is used to draw the apex coordinate that operation obtains each stroke according to stroke;Preset height is obtained, according to the vertex of each stroke Coordinate and preset height generate threedimensional model in the corresponding coordinate points of Three Dimensional Interface.
View handover module 540 is additionally operable to after obtaining switching two dimension view instruction in one of the embodiments, closes three Rendering camera is tieed up, two-dimentional rendering camera is opened, shows the planar graph on two-dimentional interface.
Specific about view switching device limits the restriction that may refer to above for view switching method, herein not It repeats again.Modules in above-mentioned view switching device can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in or independently of in the processor in computer equipment, can also store in a software form in the form of hardware In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
A kind of computer equipment is provided in one of the embodiments, which can be terminal, inside Structure chart can be as shown in Figure 7.The computer equipment include the processor connected by system bus, memory, network interface, Display screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment Memory include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and calculating Machine program.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.It should The network interface of computer equipment is used to communicate by network connection with external terminal.The computer program is executed by processor When to realize a kind of view switching method.The display screen of the computer equipment can be that liquid crystal display or electric ink are shown Screen, the input unit of the computer equipment can be the touch layer covered on display screen, can also be on computer equipment shell The button or Trackpad of setting can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 7, is only tied with the relevant part of application scheme The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment May include either combining certain components than more or fewer components as shown in the figure or being arranged with different components.
A kind of computer equipment, including memory and processor are provided in one of the embodiments, are deposited in memory Computer program is contained, which realizes following steps when executing computer program:
Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are rendered in advance for two-dimentional interface setting two dimension Three-dimensional rendering camera is arranged for Three Dimensional Interface in camera;
Two-dimentional rendering camera is opened, shows two-dimentional interface, and obtains stroke and draws operation;
Operation is being drawn while drawing planar graph on two-dimentional interface according to stroke, and operation is drawn three according to stroke Tie up drawing three-dimensional model on interface;
When getting switching 3-D view instruction, two-dimentional rendering camera is closed, opens three-dimensional rendering camera, display is three-dimensional Threedimensional model on interface.
Following steps are also realized when processor executes computer program in one of the embodiments,:It is drawn according to stroke Operation obtains the apex coordinate of each stroke;According to the apex coordinate of each stroke plan view is generated in the corresponding coordinate points in two-dimentional interface Shape.
Following steps are also realized when processor executes computer program in one of the embodiments,:It is drawn according to stroke Operation obtains the apex coordinate of each stroke;Preset height is obtained, according to the apex coordinate of each stroke and preset height in three-dimensional The corresponding coordinate points in interface generate threedimensional model.
Following steps are also realized when processor executes computer program in one of the embodiments,:Getting switching When two dimension view instructs, three-dimensional rendering camera is closed, opens two-dimentional rendering camera, shows the planar graph on two-dimentional interface.
A kind of computer readable storage medium is provided in one of the embodiments, is stored thereon with computer program, Following steps are realized when computer program is executed by processor:
Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are rendered in advance for two-dimentional interface setting two dimension Three-dimensional rendering camera is arranged for Three Dimensional Interface in camera;
Two-dimentional rendering camera is opened, shows two-dimentional interface, and obtains stroke and draws operation;
Operation is being drawn while drawing planar graph on two-dimentional interface according to stroke, and operation is drawn three according to stroke Tie up drawing three-dimensional model on interface;
When getting switching 3-D view instruction, two-dimentional rendering camera is closed, opens three-dimensional rendering camera, display is three-dimensional Threedimensional model on interface.
Following steps are also realized when computer program is executed by processor in one of the embodiments,:It is painted according to stroke System operation obtains the apex coordinate of each stroke;According to the apex coordinate of each stroke plane is generated in the corresponding coordinate points in two-dimentional interface Figure.
Following steps are also realized when computer program is executed by processor in one of the embodiments,:It is painted according to stroke System operation obtains the apex coordinate of each stroke;Preset height is obtained, according to the apex coordinate of each stroke and preset height three It ties up the corresponding coordinate points in interface and generates threedimensional model.
Following steps are also realized when computer program is executed by processor in one of the embodiments,:It is cut getting When changing two dimension view instruction, three-dimensional rendering camera is closed, opens two-dimentional rendering camera, shows the planar graph on two-dimentional interface.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, Any reference to memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (10)

1. a kind of view switching method, which is characterized in that include the following steps:
Two-dimentional interface and Three Dimensional Interface are set under Same Scene, wherein are rendered in advance for the two-dimentional interface setting two dimension Three-dimensional rendering camera is arranged for the Three Dimensional Interface in camera;
The two-dimentional rendering camera is opened, shows the two-dimentional interface, and obtain stroke and draw operation;
Operation is being drawn according to the stroke while drawing planar graph on the two-dimentional interface, is being drawn according to the stroke Operation drawing three-dimensional model on the Three Dimensional Interface;
When getting switching 3-D view instruction, the two-dimentional rendering camera is closed, the three-dimensional rendering camera is opened, shows The threedimensional model on the Three Dimensional Interface.
2. view switching method according to claim 1, which is characterized in that described to draw operation in institute according to the stroke The step of drawing planar graph on two-dimentional interface is stated, is included the following steps:
The apex coordinate that operation obtains each stroke is drawn according to the stroke;
According to the apex coordinate of each stroke planar graph is generated in the corresponding coordinate points in the two dimension interface.
3. view switching method according to claim 1, which is characterized in that described to draw operation in institute according to the stroke The step of stating drawing three-dimensional model on Three Dimensional Interface, includes the following steps:
The apex coordinate that operation obtains each stroke is drawn according to the stroke;
Preset height is obtained, it is corresponding in the Three Dimensional Interface according to the apex coordinate of each stroke and the preset height Coordinate points generate threedimensional model.
4. view switching method according to claim 1, which is characterized in that the step of the display threedimensional model it Afterwards, include the following steps:
When getting switching two dimension view instruction, the three-dimensional rendering camera is closed, opens the two-dimentional rendering camera, display Planar graph on the two dimension interface.
5. a kind of view switching device, which is characterized in that including:
Interface setup module, for two-dimentional interface and Three Dimensional Interface to be arranged under Same Scene, wherein be in advance the two dimension The two-dimentional rendering camera of interface setting, is arranged three-dimensional rendering camera for the Three Dimensional Interface;
Operation acquisition module is drawn, the two-dimentional rendering camera is used to open, shows the two-dimentional interface, and obtain stroke drafting Operation;
Image collection module, for drawing the same of planar graph on the two-dimentional interface according to stroke drafting operation When, operation drawing three-dimensional model on the Three Dimensional Interface is drawn according to the stroke;
View handover module, for when getting switching 3-D view instruction, closing the two-dimentional rendering camera, described in opening Three-dimensional rendering camera shows the threedimensional model on the Three Dimensional Interface.
6. view switching device according to claim 5, which is characterized in that described image acquisition module further includes plan view Shape acquiring unit;
The planar graph acquiring unit, for drawing the apex coordinate that operation obtains each stroke according to the stroke;According to each The apex coordinate of the stroke generates planar graph in the corresponding coordinate points in the two dimension interface.
7. view switching device according to claim 5, which is characterized in that described image acquisition module further includes three-dimensional mould Type acquiring unit;
The obtaining three-dimensional model unit, for drawing the apex coordinate that operation obtains each stroke according to the stroke;It obtains pre- If height, generated in the corresponding coordinate points of the Three Dimensional Interface according to the apex coordinate of each stroke and the preset height Threedimensional model.
8. view switching device according to claim 5, which is characterized in that the view handover module is additionally operable to obtaining To when switching two dimension view instruction, the three-dimensional rendering camera is closed, the two-dimentional rendering camera is opened, shows the two-dimentional boundary Planar graph on face.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the processor realizes view switching method any one of Claims 1-4 when executing the computer program Step.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of view switching method any one of Claims 1-4 is realized when being executed by processor.
CN201810114128.9A 2018-02-05 2018-02-05 View switching method, device, computer equipment and storage medium Pending CN108320315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810114128.9A CN108320315A (en) 2018-02-05 2018-02-05 View switching method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810114128.9A CN108320315A (en) 2018-02-05 2018-02-05 View switching method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN108320315A true CN108320315A (en) 2018-07-24

Family

ID=62901949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810114128.9A Pending CN108320315A (en) 2018-02-05 2018-02-05 View switching method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108320315A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569098A (en) * 2019-09-02 2019-12-13 上海沣沅星科技有限公司 Method, system, device and medium for generating 2D and 3D hybrid human-computer interface
CN112634412A (en) * 2020-12-16 2021-04-09 广州橙行智动汽车科技有限公司 Data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8269775B2 (en) * 2008-12-09 2012-09-18 Qualcomm Incorporated Discarding of vertex points during two-dimensional graphics rendering using three-dimensional graphics hardware
CN104778741A (en) * 2014-01-14 2015-07-15 北大方正集团有限公司 Method and device for converting two-dimensional figure into three-dimensional figure
CN105488833A (en) * 2014-10-09 2016-04-13 华为技术有限公司 Method and apparatus for realizing 3D transition animation for 2D control
CN106530388A (en) * 2016-09-08 2017-03-22 上海术理智能科技有限公司 3D printing device based on two-dimensional image, and three-dimensional modeling method for 3D printing device
CN107194978A (en) * 2017-06-05 2017-09-22 中国地质大学(武汉) A kind of three-dimensional Home Fashion & Design Shanghai and display systems based on WebGL

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8269775B2 (en) * 2008-12-09 2012-09-18 Qualcomm Incorporated Discarding of vertex points during two-dimensional graphics rendering using three-dimensional graphics hardware
CN104778741A (en) * 2014-01-14 2015-07-15 北大方正集团有限公司 Method and device for converting two-dimensional figure into three-dimensional figure
CN105488833A (en) * 2014-10-09 2016-04-13 华为技术有限公司 Method and apparatus for realizing 3D transition animation for 2D control
CN106530388A (en) * 2016-09-08 2017-03-22 上海术理智能科技有限公司 3D printing device based on two-dimensional image, and three-dimensional modeling method for 3D printing device
CN107194978A (en) * 2017-06-05 2017-09-22 中国地质大学(武汉) A kind of three-dimensional Home Fashion & Design Shanghai and display systems based on WebGL

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569098A (en) * 2019-09-02 2019-12-13 上海沣沅星科技有限公司 Method, system, device and medium for generating 2D and 3D hybrid human-computer interface
CN110569098B (en) * 2019-09-02 2022-05-24 上海沣沅星科技有限公司 Method, system, device and medium for generating 2D and 3D hybrid human-computer interface
CN112634412A (en) * 2020-12-16 2021-04-09 广州橙行智动汽车科技有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
JP2021516820A (en) Map rendering methods, equipment, computer equipment and computer programs
CN105357451A (en) Image processing method and apparatus based on filter special efficacies
US20150062171A1 (en) Method and device for providing a composition of multi image layers
CN109348299A (en) Comment on answering method, device, equipment and storage medium
CN102902848A (en) Three-dimensional visualization simulation method directed at boundary element analysis
CN113628331B (en) Data organization and scheduling method for photogrammetry model in illusion engine
CN108762505A (en) Virtual object control method, device, storage medium based on gesture and equipment
CN105224315B (en) Method and device for acquiring screen capture
CN102855648A (en) Method and device for processing image
CN104571802B (en) A kind of information processing method and electronic equipment
CN106534667A (en) Distributed cooperative rendering method and terminal
CN113827965B (en) Rendering method, device and equipment of sample lines in game scene
CN108320315A (en) View switching method, device, computer equipment and storage medium
CN110033515A (en) Figure conversion method, device, computer equipment and storage medium
JP2024506639A (en) Image display methods, devices, equipment and media
CN106355545B (en) A kind of processing method and processing device of digital picture geometric transformation
CN109697733A (en) Point searching method and device in point cloud space, computer equipment and storage medium
CN108509241B (en) Full-screen display method and device for image and mobile terminal
CN102572219B (en) Mobile terminal and image processing method thereof
CN108038916A (en) A kind of display methods of augmented reality
CN103544678A (en) Video image processing device and video image processing method
CN116597063B (en) Picture rendering method, device, equipment and medium
CN111311730B (en) Method and device for realizing three-dimensional implementation of mine
CN105989075A (en) Method, device and system for displaying image by browser
CN112767235A (en) Image processing method, image processing device, computer-readable storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220113

Address after: Room 1423, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai 200040

Applicant after: Tianyi Digital Life Technology Co.,Ltd.

Address before: 1 / F and 2 / F, East Garden, Huatian International Plaza, 211 Longkou Middle Road, Tianhe District, Guangzhou, Guangdong 510630

Applicant before: Century Dragon Information Network Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20180724

RJ01 Rejection of invention patent application after publication