CN103578127B - A kind of object turns round operation realizing method and device - Google Patents

A kind of object turns round operation realizing method and device Download PDF

Info

Publication number
CN103578127B
CN103578127B CN201310565552.2A CN201310565552A CN103578127B CN 103578127 B CN103578127 B CN 103578127B CN 201310565552 A CN201310565552 A CN 201310565552A CN 103578127 B CN103578127 B CN 103578127B
Authority
CN
China
Prior art keywords
towards
current location
rotary shaft
crown
target location
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.)
Active
Application number
CN201310565552.2A
Other languages
Chinese (zh)
Other versions
CN103578127A (en
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.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology 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 Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201310565552.2A priority Critical patent/CN103578127B/en
Publication of CN103578127A publication Critical patent/CN103578127A/en
Application granted granted Critical
Publication of CN103578127B publication Critical patent/CN103578127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Toys (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present embodiments relate to field of computer technology, particularly relate to a kind of object and turn round operation realizing method and device, the method comprise the steps that and determine that object, in vertical plane, turns to the first rotary shaft of target location from current location;Determine that object, in horizontal plane, turns to the second rotary shaft of target location from current location;Described object is rotated around described first rotary shaft and the second rotary shaft, after described object moment, current location turns round target location.Technical solution of the present invention, by object after around the first rotary shaft and the second rotary shaft, turns to target location, overcomes the taper during single shaft is turned round and waves so that it is more smooth that object turns round process, and improves Consumer's Experience effect.

Description

A kind of object turns round operation realizing method and device
Technical field
The present embodiments relate to field of computer technology, particularly relate to a kind of object and turn round operation realizing method And device.
Background technology
The creation of three-dimensional animation, game or advertisement etc. often relates to turning round, such as in animation of creation object In personage, online game, role's turns round.Turning round of object refers to that role, animated character etc. are from current institute In the current location towards vector, towards the target location of vector when turning round target.
In prior art, as a example by online game, turn round frequently with single shaft and realize the turning round of role in game. First set role as the object turning round operation, this object can by the previous dynasty to direction, the crown and current Place plane defines.The direction of motion of the object i.e. previous dynasty to, object has predefined place plane, such as Character, during its standing, the horizontal plane at place, center is for being currently located plane, is perpendicular to be currently located Plane be the crown towards, corresponding, object have in this plane left towards with the right side towards.Each object All there is the volume of self, can be with the spherical space determined occupied by object.
Single shaft has been turned round no-radius single shaft and has been turned round and turn round two kinds with non-no-radius single shaft.Non-no-radius single shaft is turned round Be imitate in reality mode of turning round turn round method, that is to say object during turning round at world coordinate system In turned to target location by current location around the arc length setting radius and realize turning round;No-radius single shaft is turned round Refer to that object crown in world coordinate system, towards constant, rotates in horizontal plane, simultaneously in present bit When putting the crown with target location towards difference, also turn round in perpendicular.For no-radius single shaft Turn round be by the previous dynasty of current location to normal vector from the previous dynasty of vector sum target location to face, vector common place For T axle, that is to say the crown of current location towards or the crown, target location towards axle, allow role around this T Axle rotate previous dynasty of current location and target location between angle, thus complete single shaft and turn round.Fig. 1 institute Show it is that in prior art, no-radius single shaft turns round schematic diagram.Object is in world coordinate system (X, Y, Z) in the drawings In, the coordinate of (X1, Y1, Z1) is the coordinate of object current location, and the coordinate of (X2, Y2, Z2) is object The coordinate of target location;Wherein, X1 and X2 be current location the previous dynasty to previous dynasty of target location to;Y1 With the left side that Y2 is current location towards with the left side of target location towards;Z1 and Z2 is the crown court of current location To with the crown of target location towards, and Z1, Z2 and T axle is for same axle.In this case, object can By with T axle as axis, rotate the angle between X1 and X2, thus turned round target position by current location Put.
No-radius single shaft is turned round, if the crown of current location is towards the crown court of vector sum target location In time there is certain angle in vector, at this moment during turning round the crown of role towards the most no longer securing.Cause Axle when turning round for role can not be with the crown of current location towards vector, can not be with the head of target location Top is towards vector, and then must redefine new axle and realize turning round.If it is assumed that this axle is L, L Axle is to be calculated to the cross product of vector to the previous dynasty of vector sum target location the previous dynasty by role current location, So during whole turning round, the crown of role spreads certain angle towards meeting around axle L, and then makes The fluency of the process of turning round of role reduces.Shown in Fig. 2 be in prior art single shaft turn round middle current location and The crown, target location is towards the equivalent schematic differed;As in figure 2 it is shown, when current location the crown towards The crown of Z1 and target location towards Z2 differ time, the most now with previous dynasty of current location to X1 and target Position determined L axle to X2 the previous dynasty, when object is turned to target location by current location around L axle, because turning During Dong, the crown of current location and target location is towards changing, then object can form a taper Wave, cause the distortion of object and the most smooth etc..Further, when single shaft turn round realize in the way of no-radius time, Because L axle currently carries out turning round towards initial point during vector position for axle with role, the process of turning round can be made to exist One taper is waved so that it is the most smooth that game role turns round process, is unfavorable for promoting Consumer's Experience effect.
Summary of the invention
For making the process of turning round of role in game more smooth, and then the experience effect of lifting game user, this The bright one object that provides turns round operation realizing method and device.
In first aspect, embodiments provide a kind of object and turn round operation realizing method, including:
Determine that object, in vertical plane, turns to the first rotary shaft of target location from current location;
Determine that object, in horizontal plane, turns to the second rotary shaft of target location from current location;
Described object is rotated around described first rotary shaft and the second rotary shaft, after described object moment, by working as Target location is turned round in front position.
In second aspect, the embodiment of the present invention additionally provides a kind of object and turns round operation and realize device, including:
First rotary shaft determines module, is used for determining that object, in vertical plane, turns to target from current location First rotary shaft of position;
Second rotary shaft determines module, is used for determining that object, in horizontal plane, turns to target from current location Second rotary shaft of position;
Rotating module, for described object is rotated around described first rotary shaft and the second rotary shaft, described right After rotating, current location turn round target location.
The object that the embodiment of the present invention provides turns round operation implementation and device, by described object around described the One rotary shaft and the second rotary shaft rotate, and after described object moment, current location turn round target location; That is to say and object is turned to target location around the first rotary shaft in vertical plane from current location, and around Two rotary shafts turn to target location from current location in horizontal plane.With this, object is turned round by two Individual rotary shaft realizes, overcome during single shaft of the prior art is turned round occur taper wave wait turn The slack phenomenon of body process so that object is turned round more smooth, and improve the experience effect of user simultaneously.
Accompanying drawing explanation
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes of the present invention Point, it is not intended that limitation of the invention.In the accompanying drawings:
It is that in prior art, single shaft turns round middle current location with the crown, target location towards time identical shown in Fig. 1 Schematic diagram;
It is that in prior art, single shaft turns round middle current location and the crown, target location towards when differing shown in Fig. 2 Schematic diagram;
It is that in the embodiment of the present invention one, object turns round operation realizing method schematic flow sheet shown in Fig. 3;
It is that in the embodiment of the present invention two, object turns round operation realizing method schematic flow sheet shown in Fig. 4;
Shown in Fig. 5 be in the embodiment of the present invention two crown towards determining method flow schematic diagram;
It is that in the embodiment of the present invention two, object turns round schematic diagram around the second rotary shaft shown in Fig. 6;
It is that in the embodiment of the present invention two, object turns round schematic diagram around the first rotary shaft shown in Fig. 7;
It is that in the embodiment of the present invention three, object is turned round operation and realized apparatus structure schematic diagram shown in Fig. 8.
Detailed description of the invention
Below in conjunction with the accompanying drawings and specific embodiment the present invention is carried out in further detail with complete explanation.Can manage Solving, specific embodiment described herein is only used for explaining the present invention, rather than limitation of the invention. It also should be noted that, for the ease of describing, accompanying drawing illustrate only part related to the present invention and Not all content.
Clear for describing, first define world coordinate system, it is absolute rectangular coordinate system in space, with X, Y Represent with Z axis.X-axis and Y-axis are positioned at horizontal plane, and Z axis is perpendicular to horizontal plane.Herein below as without spy Do not mentionlet alone bright, refer both to the vector sum coordinate determined under world coordinate system.The state of object be set as its left side towards With the right side towards being always positioned in horizontal plane, i.e. object will not be the most crooked.Even if object is in rotation process Occur left and right crooked, but reach setting position stable after also can recover the turntable that left and right is rectified.Before object Towards horizontal plane can be deviateed, i.e. can lean forward or swing back.
It is that in the embodiment of the present invention one, object turns round operation realizing method schematic flow sheet shown in Fig. 3;Preferably , in the present embodiment, object is turned round operation realizing method and be can be applicable to seek in the online games such as celestial being, concrete basis In embodiment, method can be performed realization by server-side devices.As it is shown on figure 3, described method includes:
Step 301, determine that object, in vertical plane, turns to the first rotary shaft of target location from current location.
In the present embodiment, object can be to seek game role in Xianyou play, saddle horse etc..Current location refers to right As before turning round in world coordinate system location, object present bit can be passed through in the current location of object The previous dynasty put to, left or right towards with the crown towards being determined;Target location is residing after object is turned round Position, its can by previous dynasty of subject object position to, left or right towards with the crown towards determining.
Concrete, the present embodiment determines that object in the perpendicular of world coordinate system, from current location Turn to the first rotary shaft of target location.When object rotates in perpendicular, only consider the crown of object Towards changing, this step that is to say and determine this rotary shaft.Object in the position of horizontal plane, namely It is that the previous dynasty of object is to the projection at horizontal plane and left and right towards constant.
Step 302, determine that object, in horizontal plane, turns to the second rotary shaft of target location from current location.
Object, in the horizontal plane of world coordinate system, turns to target location and refers to sit in the world from current location In mark system, it is considered to the previous dynasty of object to projection, and left or right is towards at horizontal rotation in surface.This step In i.e. determine that the second rotary shaft carrying out in such a manner turning round.
Above-mentioned steps 301 and 302 does not has fixing sequential relationship, it is possible to perform side by side.
Step 303, object is rotated around described first rotary shaft and the second rotary shaft, after described object moment, Target location is turned round by current location.
After determining the first rotary shaft and the second rotary shaft in step 301 and step 302, real in this step Existing is to allow object turn to target location rotating around the first rotary shaft and the second rotary shaft, and then realizes object Turn round.In the present embodiment, can for the sequencing carrying out rotating around the first rotary shaft or the second rotary shaft To select according to reality application;Can first rotate around the first rotary shaft, it is also possible to first around second Rotary shaft rotates, or rotates around the first rotary shaft and the second rotary shaft simultaneously.
Concrete, by first as a example by the first rotary shaft rotates, when determining that the first rotary shaft and second rotates After axle.First, around the first rotary shaft, object being turned to centre position by current location, centre position refers to Object location after object is rotated by the first rotary shaft;Carrying out in rotation process around the first rotary shaft Object current location the previous dynasty to a left side towards or the right side be in constant state towards the projection at horizontal plane, And only object the crown towards in perpendicular change (when current location the crown towards and target location The crown towards time identical, when the first rotary shaft rotates, the crown does not occurs towards in perpendicular Change);Then by centre position, object is turned to target location around the second rotary shaft, when object is around Two rotary shafts turn to during target location that the crown of object is not towards changing, and only object is being worked as The previous dynasty of front position to a left side towards or the right side towards be adjusted to previous dynasty of target location to a left side towards or right court To.And then, turn round with no-radius single shaft of the prior art compared with by around the first rotary shaft and second rotate Axle realizes the rotation of object respectively and achieves turning round of object.This kind of mode realizes the turning round because object turns of object Body process is no longer based on single shaft, so object no longer occurs that during turning round taper is waved so that right Elephant to turn round process more smooth.
The object that the embodiment of the present invention provides turns round operation implementation, by object around the first rotary shaft vertically Turn to target location in face from current location, and turn from current location in horizontal plane around the second rotary shaft Move target location.With this, object is turned round and is realized by two rotary shafts, that is to say object Position turns to the process of target location, realizes at twice so that object no longer occurs cone during turning round Shape is waved, and overcomes the taper occurred during no-radius single shaft of the prior art is turned round and waves etc. and to turn round The slack phenomenon of journey so that object is turned round more smooth, and improve the experience effect of user simultaneously.
It is that in the embodiment of the present invention two, object turns round operation realizing method schematic flow sheet, this enforcement shown in Fig. 4 The enforcement of example is based on embodiment one.Preferably, in the present embodiment, object is turned round operation realizing method and can be answered For seeking in the online games such as celestial being, in concrete the present embodiment, method can be performed reality by server-side devices Existing.
In seeking Xianyou play, the previous dynasty of character object current location is to referring to the direction of motion of role or towards, angle The look direction of motion just can be obtained by the operational order of user before role turns round;Before role goal position Towards the direction of motion referring to that user operation character object role to be made goes to, playing trip by obtaining user The mode of the operational order during play obtains;World coordinate system is the absolute coordinate system of system, is not building Before vertical object coordinates system on picture coordinate a little be all that the initial point with world coordinate system is respective to determine Position, that is to say the system of games system setting themselves, the world can be obtained according to data set in advance Coordinate system vertically on towards, previous dynasty to, and a left side towards or the right side towards.
Technical solution of the present invention realization in seeking Xianyou play is based on above-mentioned known quantity, such as Fig. 4 institute Showing, described method includes:
Step 401, according to upper towards determine ought to world coordinate system previous dynasty of object current location The crown of front position towards.
The crown of current location is towards referring to that, when object is in current position state, it is perpendicular to current location The previous dynasty to a left side towards or the right side towards towards.
Shown in Fig. 5 be in the embodiment of the present invention two crown towards determining method flow schematic diagram;Such as Fig. 5 institute Showing, it realizes according to the following steps:
Step 4011, according to previous dynasty of object current location to world coordinate system vertically on towards cross product, Determine the left side of current location towards or the right side towards.
As it is assumed that under object stable state will not left and right crooked, so left and right towards certainty and the previous dynasty to, And towards vertically on vertically.The previous dynasty of object is to referring to the motion in world coordinate system of the object current location Towards, can be considered known vector;World coordinate system is the absolute coordinate system of system, sits being not set up object Before mark system in system coordinate a little be all that the initial point with world coordinate system is to determine respective position. Therefore, it can previous dynasty according to object current location to world coordinate system vertically on towards determining present bit The left side put towards or the right side towards.
Shown in Fig. 1 and Fig. 2, the previous dynasty of current location is to the court of the X1 axle that is to say object coordinates system To.The Z axis of world coordinate system towards that is to say world coordinate system vertically on towards.Because of when object present bit The left or right put towards both perpendicular to current position the previous dynasty to world coordinate system vertically on towards, because of This can by the previous dynasty of object current location to world coordinate system vertically on towards cross product determine current A left side for position towards or the right side towards.
Step 4012, according to a left side towards or the right side towards with previous dynasty of current location to cross product determine current location The crown towards.
Shown in Fig. 1, Fig. 2, a left side for current location towards or the right side towards, previous dynasty to the crown towards jointly The framework coordinate system at place, current location, then a left side for current location towards or the right side towards, previous dynasty to and the crown Towards being mutually orthogonal to one another.Step 4012 determines the left side of current location towards or the right side towards, then The previous dynasty according to known current location to then can by ask for left towards or the right side towards with current location before Towards the mode of cross product determine the crown of current location towards.
Step 402, according to the crown of current location towards, determine using the crown towards as first of normal vector;
The crown according to the current location determined in step 401 towards, this step is accomplished that and determines currently The crown, position is towards making first of normal vector.
Step 403, according to previous dynasty of subject object position to world coordinate system vertically on towards cross product, Determine the left side of target location towards or the right side towards.
In this step, according to previous dynasty of fixed target location to world coordinate system vertically on towards asking The mode of cross product determine the left side of target location towards or the right side towards.
Step 404, determine using the left side of described target location towards or the right side towards as second of normal vector.
Determine in step 403 the left side of target location towards or the right side towards, this step is accomplished that according to really A fixed left side towards or the right side towards, and then determine left towards or the right side towards the face as normal vector.May be appreciated It is, left towards being the same face with the right side towards the face of left normal vector.
Step 405, the concurrent aces determining first and second are the first rotary shaft.
After determining first and second, and then determine the concurrent aces in two faces, and by first and second The axle that face is intersected is as the first rotary shaft.
Preferably, in the present embodiment by first and second on current location or the crown of target location object Towards axle on formed concurrent aces as the first rotary shaft.
Step 406, according to previous dynasty of object current location to world coordinate system vertically on towards determining object The crown of current location towards.
This step determining, the crown of object current location is towards being to determine object current location in step 401 The crown towards identical.In implementing, this step can utilize the present bit obtained in step 401 The crown put is towards the realization as this step, it is also possible to utilize the process addressed in step 401 again Determine the crown of object current location towards.
Step 407, by with the crown of current location towards identical, through described object axle planar As the second rotary shaft step.
In this step, that is to say and rotate as second in current location or the central shaft in target location using object Axle.In conjunction with Fig. 1, that is to say Z1 or Z2 axle as the second rotary shaft.
Step 408, object is turned to target position around described first rotary shaft in vertical plane from current location Put, and in horizontal plane, turn to target location from current location around described second rotary shaft.
First being rotated by around the second rotary shaft by object, after rotation, object is in centre Position;And then object is rotated around the second rotary shaft by centre position, after rotation, object is in target position Put.
It is that in the embodiment of the present invention, object turns round schematic diagram around the second rotary shaft shown in Fig. 6.As shown in Figure 6, Object is at the coordinate (X1, Y1, Z1) of current location, and wherein X1 is that the previous dynasty of object current location is to, Y2 Be object current location a left side towards, Z1 be object current location the crown towards;Rotate around the second rotary shaft To intermediate position coordinates (Xo, Yo, Zo), wherein Xo be object centre position the previous dynasty to, Yo is right As centre position a left side towards, Zo be object centre position the crown towards.
In figure 6 object from current location when the second rotary shaft turns round target location, the crown court of object To be at same towards, and a left side for object towards with the previous dynasty to there occurs change in horizontal plane.Currently During position, the previous dynasty of the current location of object to being X1, left towards being Y1, when turning to centre position before Towards being Xo, left towards being Yo;Further, shown in Fig. 1, the previous dynasty in centre position is to Xo and a left side Towards previous dynasty of Yo and target location to X2, left is identical towards Y2.But around the second axle rotation process In, the crown of current location is identical towards Z1 with Zo.
It is that in the embodiment of the present invention, object turns round schematic diagram around the first rotary shaft shown in Fig. 7.As it is shown in fig. 7, Object intermediate position coordinates (Xo, Yo, Zo) wherein Xo be object centre position the previous dynasty to, Yo is right As centre position a left side towards, Zo be object centre position the crown towards.The coordinate of subject object position (X2, Y2, Z2) wherein X2 be object target location the previous dynasty to, Y2 is an object left side in target location Towards, Z2 be object target location the crown towards.
Object when the first rotary shaft is turned to target location by centre position, the previous dynasty of object to a left side towards Projection in horizontal plane is in constant state, and the crown of object is lifted towards occurring in that in perpendicular Rise and decline, and then realizing object and turned round target location by current location.Around the first axle rotary shaft by Between position when turning to target location, the left side in object centre position will not change towards Yo, and at this moment in the middle of The previous dynasty of position to Xo and left be that the previous dynasty of target location is to X2 and left towards Y2 towards Yo.Now, object Turn to the crown of target location towards Z2 on the crown in centre position towards Zo, realize the object rotation at Z axis Turn, and then achieve object and turned round target location by current location,
As a kind of preferred embodiment in the present embodiment, it is further optimization object in the present embodiment Turn round process, increase the fluency that object is turned round, around same time shaft, synchronize to perform described object around institute State the first rotary shaft and the second rotary shaft rotates, after described object moment, current location turn round target position The operation put.That is to say, object is rotated around the first rotary shaft and the second rotary shaft, this kind of side simultaneously Formula carries out turning round so that object more connecting during turning round around the first rotary shaft and the second rotary shaft, Decrease by the first rotary shaft to the second rotary shaft excessively during jumping characteristic so that object is turned round more Fluency.For the rotation process along two rotary shafts, the weights that can arrange velocity of rotation control to rotate Rhythm, such as vertical plane rotation first quick and back slow, in the uniform rotation of horizontal plane.
The object that the embodiment of the present invention provides turns round operation implementation and device, by object around the first rotary shaft In vertical plane, turn to target location from current location, and around the second rotary shaft in horizontal plane from currently Position turns to target location.With this, object is turned round and is realized by two rotary shafts, overcome The taper that single shaft of the prior art occurs during turning round is waved etc. and to be turned round the slack phenomenon of process so that Object is turned round more smooth, and improves the experience effect of user simultaneously.
It is that in the embodiment of the present invention four, object is turned round operation and realized apparatus structure schematic diagram, such as Fig. 8 shown in Fig. 8 Shown in, described in turn round operation and realize apparatus structure and include:
First rotary shaft determines module 801, is used for determining that object, in vertical plane, turns to mesh from current location First rotary shaft of cursor position.
Preferably, in the present embodiment, the first rotary shaft determines that module 801 includes that the crown is towards determining submodule 8011, for according to previous dynasty of object current location to world coordinate system vertically on towards determining present bit The crown put towards;First determines submodule 8012, for according to the crown of described current location towards, Determine using the crown towards as first of normal vector;Target location left towards or the right side towards determining module 8013, For the previous dynasty according to subject object position to world coordinate system vertically on towards cross product, determine target A left side for position towards or the right side towards;Second determines submodule 8014, for determining the left court with target location To or the right side towards as second of normal vector;First rotary shaft determines submodule 8015, is used for determining described The concurrent aces of first and second is the first rotary shaft.Second rotary shaft determines module 802, and it is right to be used for determining As, in horizontal plane, turning to the second rotary shaft of target location from current location.
Preferably, in the present embodiment, the second rotary shaft determines that module 802 includes that the crown is towards determining submodule 8021, for according to upper towards determining that object ought to world coordinate system previous dynasty of object current location The crown of front position towards;Second rotary shaft determines submodule 8022, for by the head with described current location Push up towards identical, through described object axle planar as the second rotary shaft.
Preferably, in the present embodiment the crown towards determine submodule 8022 include left towards or the right side towards determining list Unit, for according to previous dynasty of object current location to world coordinate system vertically on towards cross product, determine A left side for current location towards or the right side towards.
The crown towards determining unit, for according to a described left side towards or the right side towards the previous dynasty with described current location To cross product determine the crown of current location towards.
Rotating module 803, for described object is rotated around described first rotary shaft and the second rotary shaft, described After object moment, current location turn round target location.
Preferably, in the present embodiment, rotating module 803 is specifically for around same time shaft, synchronizes to perform institute State object to rotate around described first rotary shaft and the second rotary shaft, after described object moment, turn current location Body is to the operation of target location.
The object that the embodiment of the present invention provides is turned round operation and is realized device, by object around the first rotary shaft vertically Turn to target location in face from current location, and turn from current location in horizontal plane around the second rotary shaft Move target location.With this, object is turned round and is realized by two rotary shafts, overcome existing skill The taper that single shaft in art occurs during turning round is waved etc. and to be turned round the slack phenomenon of process so that object turns Body is more smooth, and improves the experience effect of user simultaneously.
Obviously, it will be understood by those skilled in the art that each module or each step of the above-mentioned present invention can be used General calculating device realizes, and they can concentrate on single calculating device, or is distributed in multiple meter Calculating on the network that device is formed, alternatively, they can come with the executable program code of computer installation Realize, performed by calculating device such that it is able to be stored in storing in device, or by them respectively It is fabricated to each integrated circuit modules, or the multiple modules in them or step are fabricated to single integrated electricity Road module realizes.So, the present invention is not restricted to the combination of any specific hardware and software.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for this area skill For art personnel, the present invention can have various change and change.All institutes within spirit and principles of the present invention Any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.

Claims (6)

1. an object turns round operation realizing method, it is characterised in that including:
Determining that object, in vertical plane, turns to the first rotary shaft of target location from current location, this is first years old The determination of rotary shaft specifically include previous dynasty according to object current location to world coordinate system vertically on towards Determine the crown of current location towards, according to the crown of described current location towards, determine with the crown towards work For first of normal vector, according to previous dynasty of subject object position to world coordinate system vertically on towards Cross product, determine the left side of target location towards or the right side towards, determine the left side with described target location towards or right court To as second of normal vector, determine that the concurrent aces of described first and second is the first rotary shaft;
Determining that object, in horizontal plane, turns to the second rotary shaft of target location from current location, this is second years old The determination of rotary shaft specifically include previous dynasty according to object current location to world coordinate system vertically on towards Determine the crown of object current location towards, by with the crown of described current location towards identical, through institute State object axle planar as the second rotary shaft;
Described object is rotated around described first rotary shaft and the second rotary shaft, after described object moment, by working as Target location is turned round in front position.
2. object as claimed in claim 1 turns round operation realizing method, it is characterised in that work as according to object The previous dynasty of front position to world coordinate system vertically on towards determine the crown of current location towards, including:
The previous dynasty according to object current location to world coordinate system vertically upper towards cross product, determine currently A left side for position towards or the right side towards;
According to a described left side towards or the right side towards with previous dynasty of described current location to cross product determine current location The crown towards.
3. object as claimed in claim 1 turns round operation realizing method, it is characterised in that described by described Object rotates around described first rotary shaft and the second rotary shaft, after described object moment, turns round current location Include to target location:
Around same time shaft, synchronize to perform to rotate described object around described first rotary shaft and the second rotary shaft, After described object moment, current location turn round target location.
4. an object is turned round operation and is realized device, it is characterised in that including:
First rotary shaft determines module, is used for determining that object, in vertical plane, turns to target from current location First rotary shaft of position, this first rotary shaft determines that module specifically includes the crown towards determining submodule, uses In the previous dynasty according to object current location to world coordinate system vertically on towards the crown determining current location Towards, first determines submodule, for according to the crown of described current location towards, determine with crown court To as first of normal vector, target location left towards or the right side towards determining module, for according to object mesh The previous dynasty of cursor position to world coordinate system vertically on towards cross product, determine the left side of target location towards or Right towards, second determines submodule, for determine using the left side of described target location towards or the right side towards as Second of normal vector, the first rotary shaft determines submodule, for determining described first and the phase of second Quadrature axis is the first rotary shaft;
Second rotary shaft determines module, is used for determining that object, in horizontal plane, turns to target from current location Second rotary shaft of position, this second rotary shaft determines that module specifically includes the crown towards determining submodule, uses In the previous dynasty according to object current location to world coordinate system vertically on towards determining object current location The crown towards, the second rotary shaft determines submodule, for by with the crown of described current location towards identical, Through described object axle planar as the second rotary shaft;
Rotating module, rotates around described first rotary shaft and the second rotary shaft for the most described object, described After object moment, current location turn round target location.
5. object as claimed in claim 4 is turned round operation and is realized device, it is characterised in that the crown is towards really Stator modules includes:
Current location left towards or the right side towards determining unit, for the previous dynasty according to object current location to and generation Boundary's coordinate system vertically on towards cross product, determine the left side of current location towards or the right side towards;
The crown towards determining unit, for according to a described left side towards or the right side towards the previous dynasty with described current location To cross product determine the crown of current location towards.
6. object as claimed in claim 4 is turned round operation and is realized device, it is characterised in that described rotation mould Block, specifically for around same time shaft, synchronizes to perform to rotate described object around described first rotary shaft and second Axle rotates, and after described object moment, current location turns round the operation of target location.
CN201310565552.2A 2013-11-13 2013-11-13 A kind of object turns round operation realizing method and device Active CN103578127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310565552.2A CN103578127B (en) 2013-11-13 2013-11-13 A kind of object turns round operation realizing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310565552.2A CN103578127B (en) 2013-11-13 2013-11-13 A kind of object turns round operation realizing method and device

Publications (2)

Publication Number Publication Date
CN103578127A CN103578127A (en) 2014-02-12
CN103578127B true CN103578127B (en) 2016-08-31

Family

ID=50049847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310565552.2A Active CN103578127B (en) 2013-11-13 2013-11-13 A kind of object turns round operation realizing method and device

Country Status (1)

Country Link
CN (1) CN103578127B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105488834B (en) * 2015-12-01 2019-03-19 网易(杭州)网络有限公司 The method of adjustment and device of role's face orientation
CN110458943B (en) * 2019-07-31 2021-09-14 深圳市商汤科技有限公司 Moving object rotating method and device, control equipment and storage medium
CN113926187A (en) * 2021-10-20 2022-01-14 腾讯科技(深圳)有限公司 Object control method and device in virtual scene and terminal equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1140861A (en) * 1995-05-12 1997-01-22 索尼公司 Method and apparatus for producing animation data
US7423650B2 (en) * 2005-12-09 2008-09-09 Electronics And Telecommunications Research Institute Method of representing and animating two-dimensional humanoid character in three-dimensional space
CN101447093A (en) * 2002-05-24 2009-06-03 英国电讯有限公司 Image processing method and system
CN102004612A (en) * 2010-12-03 2011-04-06 深圳市蓝韵实业有限公司 Method for rotating three-dimensional image
US8111284B1 (en) * 2004-07-30 2012-02-07 Extreme Reality Ltd. System and method for 3D space-dimension based image processing
CN102663795A (en) * 2012-04-06 2012-09-12 谌方琦 2.5D character animation realization method based on webpage and system thereof
CN103077546A (en) * 2012-12-27 2013-05-01 江苏太奇通软件有限公司 Three-dimensional perspective transforming method of two-dimensional graphics

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1140861A (en) * 1995-05-12 1997-01-22 索尼公司 Method and apparatus for producing animation data
CN101447093A (en) * 2002-05-24 2009-06-03 英国电讯有限公司 Image processing method and system
US8111284B1 (en) * 2004-07-30 2012-02-07 Extreme Reality Ltd. System and method for 3D space-dimension based image processing
US7423650B2 (en) * 2005-12-09 2008-09-09 Electronics And Telecommunications Research Institute Method of representing and animating two-dimensional humanoid character in three-dimensional space
CN102004612A (en) * 2010-12-03 2011-04-06 深圳市蓝韵实业有限公司 Method for rotating three-dimensional image
CN102663795A (en) * 2012-04-06 2012-09-12 谌方琦 2.5D character animation realization method based on webpage and system thereof
CN103077546A (en) * 2012-12-27 2013-05-01 江苏太奇通软件有限公司 Three-dimensional perspective transforming method of two-dimensional graphics

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Character Animation from 2D Picture and 3D Motion Data;Alexander Hornung .et al;《Journal ACM Transactions on Graphics(TOG)》;20070131;第26卷(第1期);第1-9页 *
利用"球面三角"建立三维图形旋转变换参数的关系;陈东祥等;《工程图学学报》;20011231(第4期);第97-100页 *

Also Published As

Publication number Publication date
CN103578127A (en) 2014-02-12

Similar Documents

Publication Publication Date Title
CN104870063B (en) For cloud processing and the system and method for the content being superimposed on the stream-type video frame of remote processing application
CN102939139B (en) Calibration of portable devices in shared virtual space
EP3332565B1 (en) Mixed reality social interaction
CN103324453B (en) Display
US9849378B2 (en) Methods, apparatuses, and systems for remote play
JP6181917B2 (en) Drawing system, drawing server, control method thereof, program, and recording medium
CN105373224A (en) Hybrid implementation game system based on pervasive computing, and method thereof
CN107683449A (en) The personal space content that control is presented via head mounted display
US10933327B2 (en) Network-based video game editing and modification distribution system
CN103918012A (en) Rendering system, rendering server, control method thereof, program, and recording medium
CN110251936B (en) Method and device for controlling virtual camera in game and storage medium
CN107362532A (en) The direction input of video-game
CN110832442A (en) Optimized shading and adaptive mesh skin in point-of-gaze rendering systems
CN103578127B (en) A kind of object turns round operation realizing method and device
CN105913471A (en) Image processing method and device
CN108427595A (en) The determination method and device of user interface controls display location in virtual reality
CN103139580A (en) Generation method of three-dimensional panoramic space stereo image
WO2022111038A1 (en) Map generation method and apparatus, computer device and computer readable storage medium
US20230321535A1 (en) Coordinate axis display method and apparatus applied to virtual environments, terminal, and medium
CN109806595A (en) Labeling method, device, storage medium, processor and the terminal in orientation
CN101524591B (en) Game device
CN107391005A (en) The method of control main frame onscreen cursor movement, game paddle
CN110152292A (en) Display control method and device, the storage medium and electronic equipment of rising space in game
JP4656615B2 (en) Image generation system, program, and information storage medium
CN109847360A (en) 3D effect processing method, device, electronic equipment and the medium of game item

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant