Summary of the invention
Technical problem to be solved by this invention is to provide a kind of implementation method and device of scrolling of scrolling contents on screen, in order to ensure the fidelity of picture in scrolling design.
In order to solve the problem, the invention discloses a kind of implementation method of scrolling of scrolling contents on screen, described method comprises:
Three-dimensional body foundation step: the three-dimensional body creating each pel in roll screen content of text;
Locus setting procedure: be the three-dimensional body setting space position of each created pel; Described locus is set by three-dimensional coordinate;
Group node adds step: added in group node according to the locus of each three-dimensional body;
Rolling requires setting procedure: set the rotating direction of group node, rolling stunt and rolling speed;
Coordinate transform step: scroll contents requires to carry out the rolling that coordinate transform completes scroll contents according to set rolling after screen.
Preferably, described rolling stunt comprises inclination, Rotation and Zoom.
More preferred, described three-dimensional body foundation step comprises following sub-step:
Obtain the roll screen modular unit that current establishment three-dimensional body is used;
The three-dimensional body of current roll screen content of text is generated with obtained roll screen modular unit.
Preferably, described rotating direction comprises X-axis, Y-axis and Z-direction.
Preferably, described content of text is made up of multiple pel, and described pel comprises word pel, picture pel and geometry pel.
The present invention also disclosed a kind of implement device of scrolling of scrolling contents on screen, and described device comprises:
Creation module, for creating the three-dimensional body of each pel in roll screen content of text;
Setting module, for the three-dimensional body setting space position for each created pel; Described locus is set by three-dimensional coordinate;
Dose module, for being added in group node according to the locus of each three-dimensional body;
Module is set, for setting the rotating direction of group node, rolling stunt and rolling speed;
Conversion module, requires to carry out the rolling that coordinate transform completes scroll contents according to set rolling after screen on scroll contents.
Preferably, the described rolling stunt arranged set by module comprises inclination, Rotation and Zoom.
Preferably, described creation module comprises following submodule:
Obtain submodule, for obtaining current establishment three-dimensional body roll screen modular unit used;
Generate submodule, for generating the three-dimensional body of current roll screen content of text with obtained roll screen modular unit.
Compared with prior art, the present invention has the following advantages:
The present invention is by creating the three-dimensional body of each pel in roll screen content of text, for the three-dimensional body setting space position of each created pel, added in group node according to the locus of each three-dimensional body, set the rotating direction of group node, rolling stunt and rolling speed, scroll contents requires to carry out the rolling that coordinate transform completes scroll contents according to set rolling after screen, scroll contents rolls with the form of three-dimensional body after screen, greatly improve rolling effect, meet the demand of people's visually fidelity.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Along with the development of video and multimedia technology, the application of image-text packaging system in captions make is more and more extensive, often need in actual applications to use roll screen effect, if a kind of implementation method realizing scrolling of scrolling contents on screen true to nature can be found, the visual demand of people and actual application demand so greatly will be met.
Therefore, inventor herein is one of core idea proposing the embodiment of the present invention creatively, namely a kind of implementation method and device of scrolling of scrolling contents on screen are provided, by creating the three-dimensional body of each pel in roll screen content of text, for the three-dimensional body setting space position of each created pel, added in group node according to the locus of each three-dimensional body, set the rotating direction of group node, rolling stunt and rolling speed, scroll contents requires to carry out the rolling that coordinate transform completes scroll contents according to set rolling after screen.
Embodiment one:
With reference to Fig. 1, show the implementation method flow chart of a kind of scrolling of scrolling contents on screen of the present invention, described method specifically comprises:
Three-dimensional body foundation step S101, creates the three-dimensional body of each pel in roll screen content of text;
Preferably, described content of text is made up of multiple pel, and described pel comprises word pel, picture pel and geometry pel.
In actual fabrication, need the roll screen content of text making roll screen effect to be all made up of multiple or multiple pel, comprise word pel, picture pel and geometry pel specifically, the establishment of different its three-dimensional bodies of pel also there is difference.
Preferably, described three-dimensional body foundation step comprises following sub-step:
Obtain the roll screen modular unit that current establishment three-dimensional body is used;
The three-dimensional body of current roll screen content of text is generated with obtained roll screen modular unit.
Described roll screen modular unit is present in roll screen template file, multiple roll screen modular unit is had in a roll screen template file, in roll screen template file, roll screen modular unit generally stores classifiedly according to primitive types, the acquisition of roll screen modular unit can be carried out according to current corresponding primitive types and required effect in practical application, further, apply mechanically accessed roll screen modular unit with current roll screen content of text, play up the three-dimensional body generating current roll screen content of text.
Locus setting procedure S102 is the three-dimensional body setting space position of each created pel; Described locus is set by three-dimensional coordinate;
After needs have all created with the three-dimensional body of each pel in the roll screen content of text of roll screen effect, determined the locus of the three-dimensional body of each pel by the three dimensional space coordinate setting each three-dimensional body.Specifically refer to, set each three-dimensional body in X-axis, the coordinate figure on Y-axis and Z axis.
Group node adds step S103, is added in group node according to the locus of each three-dimensional body;
Added in group node according to the locus of each three-dimensional body, in described group node, each three-dimensional body exists with the form of a node, each three-dimensional body can add group node before upper screen rolls, automatically group node can be exited after rolling out screen, meanwhile, have new three-dimensional body and enter group node.
Rolling requires setting procedure S104, sets the rotating direction of group node, rolling stunt and rolling speed;
Preferably, described rotating direction comprises X-axis, Y-axis and Z-direction.
Preferably, described rolling stunt comprises inclination, Rotation and Zoom.
Each three-dimensional body is joined in group node, the rolling of scroll contents is realized by the spatial alternation attribute setting group node, specifically, the rotating direction of setting scroll contents, as along X-axis translation or along Y-axis translation or be along Z axis translation etc.; The rolling stunt of setting scroll contents, rotating as carried out, tilting or carrying out convergent-divergent etc., can set according to the reality demand of rolling; The speed that setting is rolled, being specifically set every how long once triggering, moving according to triggering signal.
Coordinate transform step S105, scroll contents requires to carry out the rolling that coordinate transform completes scroll contents according to set rolling after screen.
According to above introduce after step operated, according to set rolling requirement after scroll contents shields, complete rolling by carrying out coordinate transform, what present in rolling process is all three-dimensional body, greatly improve rolling effect, meet the demand of people's visually fidelity.
Embodiment two:
With reference to Fig. 2, show the implement device structure chart of a kind of scrolling of scrolling contents on screen of the present invention, described device specifically comprises:
Creation module 201, for creating the three-dimensional body of each pel in roll screen content of text;
Setting module 202, for the three-dimensional body setting space position for each created pel; Described locus is set by three-dimensional coordinate;
Dose module 203, for being added in group node according to the locus of each three-dimensional body;
Module 204 is set, for setting the rotating direction of group node, rolling stunt and rolling speed;
Conversion module 205, requires to carry out the rolling that coordinate transform completes scroll contents according to set rolling after screen on scroll contents.
Preferably, the described rolling stunt arranged set by module 204 comprises inclination, Rotation and Zoom.
More preferred, described creation module 201 comprises following submodule:
Obtain submodule 2011, for obtaining current establishment three-dimensional body roll screen modular unit used;
Generate submodule 2012, for generating the three-dimensional body of current roll screen content of text with obtained roll screen modular unit.
In the present invention, the three-dimensional body of each pel in roll screen content of text is created by creation module 201, the three-dimensional body setting space position that setting module 202 is each created pel, described locus is set by three-dimensional coordinate, dosing module 203 is added in group node according to the locus of each three-dimensional body, the rotating direction that module 204 sets group node is set, rolling stunt and rolling speed, require to carry out the rolling that coordinate transform completes scroll contents according to set rolling after conversion module 205 shields on scroll contents, require that the roll screen content of text realizing roll screen represents on screen with the form of three-dimensional body after treatment, improve the effect of roll screen greatly, greatly meet people visually to the demand of fidelity.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Above the implementation method of a kind of scrolling of scrolling contents on screen provided by the present invention and device are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.