CN116797769A - Data processing method, device, computer equipment and readable storage medium - Google Patents

Data processing method, device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN116797769A
CN116797769A CN202311063146.6A CN202311063146A CN116797769A CN 116797769 A CN116797769 A CN 116797769A CN 202311063146 A CN202311063146 A CN 202311063146A CN 116797769 A CN116797769 A CN 116797769A
Authority
CN
China
Prior art keywords
projection
vector
output
determining
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311063146.6A
Other languages
Chinese (zh)
Other versions
CN116797769B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311063146.6A priority Critical patent/CN116797769B/en
Publication of CN116797769A publication Critical patent/CN116797769A/en
Application granted granted Critical
Publication of CN116797769B publication Critical patent/CN116797769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2016Rotation, translation, scaling

Abstract

The embodiment of the application provides a data processing method, a device, computer equipment and a readable storage medium, which are applied to the fields of cloud technology, games, video, intelligent traffic, auxiliary driving and the like, and the method comprises the following steps: obtaining a vertical plane perpendicular to the unit vector; the vertical plane comprises S output directions; acquiring a rotation vector corresponding to the unit vector, and determining an angle proportion value of the rotation vector to the unit vector; the rotation vector is a vector obtained by spatially rotating the unit vector; obtaining projection vectors of the rotation vectors on a vertical plane, and determining direction proportion values of the projection vectors respectively aiming at S output directions; according to the angle proportion value and the S direction proportion values, determining axial rotation parameters corresponding to S output directions respectively; the S axial rotation parameters are used to drive the default vector to axially rotate to the position indicated by the rotation vector. By adopting the method and the device, the accuracy of axial rotation of the default vector can be improved.

Description

Data processing method, device, computer equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, a data processing device, a computer device, and a readable storage medium.
Background
The existing axial rotation positioning method can set cones corresponding to different events in a multidimensional (e.g. three-dimensional) space (wherein different events can represent different actions), and for each cone, an included angle offset value of axial rotation can be used to determine an axial rotation parameter of a default vector for the cone. If the default vector is completely attached to the central shaft of the cone, the event is completely triggered, and the axial rotation parameter is 1; optionally, if the default vector completely fits the surface of the cone, the event is indicated to be completely not triggered, and the axial rotation parameter is 0; alternatively, if the default vector is between the central axis of the cone and the surface of the cone, the corresponding axial rotation parameter is output according to the default vector, the included angle between the central axis of the cone and the surface of the cone.
However, multiple cones corresponding to each event may be set in the three-dimensional space, there may be an overlap between the multiple cones (e.g., there is an overlap between the cone of event a and the cone of event B, and there is an overlap between the surface of the cone of event a and the central axis of the cone of event B), and if the default vector completely fits the central axis of the cone of event B, the default vector may be between the central axis of the cone of event a and the surface of the cone of event a. At this time, the axial rotation parameter corresponding to the event B may be 1, for example, the axial rotation parameter corresponding to the event a may be 0.1, and the existing axial rotation positioning method may superimpose the event a on the event B, so that the default vector triggers the event a and the event B at the same time, and further, the axial rotation parameter of the event B superimposes the axial rotation parameter of the event a, so that an error occurs in the axial rotation of the default vector.
Disclosure of Invention
The embodiment of the application provides a data processing method, a data processing device, computer equipment and a readable storage medium, which can improve the accuracy of axial rotation of a default vector.
In one aspect, an embodiment of the present application provides a data processing method, including:
obtaining a vertical plane perpendicular to the unit vector; the vertical plane comprises S output directions; s is a positive integer; the starting point and the direction of the unit vector are the same as those of the default vector; the default vector is used for indicating the initial state of the virtual part in the virtual object;
acquiring a rotation vector corresponding to the unit vector, and determining an angle proportion value of the rotation vector to the unit vector; the rotation vector is a vector obtained by spatially rotating the unit vector;
obtaining projection vectors of the rotation vectors on a vertical plane, and determining direction proportion values of the projection vectors respectively aiming at S output directions;
according to the angle proportion value and the S direction proportion values, determining axial rotation parameters corresponding to S output directions respectively; the S axial rotation parameters are used for driving the default vector to axially rotate to the position indicated by the rotation vector; the default vector after driving is used for indicating the virtual part to be updated from the initial state to the target state.
In one aspect, an embodiment of the present application provides a data processing apparatus, including:
the plane acquisition module is used for acquiring a vertical plane vertical to the unit vector; the vertical plane comprises S output directions; s is a positive integer; the starting point and the direction of the unit vector are the same as those of the default vector; the default vector is used for indicating the initial state of the virtual part in the virtual object;
the first proportion value acquisition module is used for acquiring a rotation vector corresponding to the unit vector and determining an angle proportion value of the rotation vector for the unit vector; the rotation vector is a vector obtained by spatially rotating the unit vector;
the second proportional value acquisition module is used for acquiring projection vectors of the rotation vectors on a vertical plane and determining direction proportional values of the projection vectors respectively aiming at S output directions;
the parameter determining module is used for determining axial rotation parameters corresponding to the S output directions respectively according to the angle proportion value and the S direction proportion values; the S axial rotation parameters are used for driving the default vector to axially rotate to the position indicated by the rotation vector; the default vector after driving is used for indicating the virtual part to be updated from the initial state to the target state.
The first proportional value acquisition module is specifically configured to spatially rotate the unit vector to obtain a spatially rotated unit vector, and determine the spatially rotated unit vector as a rotation vector corresponding to the unit vector;
The first proportion value obtaining module is specifically configured to obtain a spatial rotation angle between the unit vector and the rotation vector, and determine a ratio between the spatial rotation angle and a rotation angle threshold as an angle proportion value of the rotation vector for the unit vector.
Wherein, the second ratio value obtaining module includes:
the plane projection unit is used for carrying out plane projection on the rotation vector to obtain a projection vector of the rotation vector on a vertical plane;
the direction determining unit is used for determining a target output direction corresponding to the projection vector in the S output directions according to the projection coordinates of the projection vector;
and the proportion value determining unit is used for determining direction proportion values of the projection vectors respectively aiming at the S output directions based on the target output directions.
Wherein the direction determining unit includes:
a coordinate determination subunit configured to determine coordinates of an end point of the projection vector as projection coordinates of the projection vector;
the coordinate determining subunit is used for determining coordinate axis projection parameters corresponding to the projection vectors according to the projection coordinates of the projection vectors;
the coordinate determining subunit is used for determining non-coordinate axis projection parameters corresponding to the projection vectors according to the projection coordinates of the projection vectors;
The direction determining subunit is used for carrying out addition operation on the coordinate axis projection parameters and the non-coordinate axis projection parameters to generate output parameters corresponding to the projection vectors;
and the direction determining subunit is used for determining the target output direction corresponding to the projection vector in the S output directions according to the output parameters.
Wherein the vertical plane comprises a plane transverse axis and a plane longitudinal axis; the projection coordinates of the projection vector comprise a horizontal axis coordinate value corresponding to a horizontal axis of a plane and a vertical axis coordinate value corresponding to a vertical axis of the plane;
the coordinate determining subunit is specifically configured to determine the first projection parameter as a cross-axis projection parameter corresponding to the projection vector if the cross-axis coordinate value is equal to the coordinate threshold value, and determine the second projection parameter as a cross-axis projection parameter corresponding to the projection vector if the cross-axis coordinate value is not equal to the coordinate threshold value;
the coordinate determining subunit is specifically configured to determine the third projection parameter as a vertical axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is equal to the coordinate threshold value, and determine the fourth projection parameter as a vertical axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is not equal to the coordinate threshold value;
the coordinate determination subunit is specifically configured to perform an addition operation on the horizontal axis projection parameter and the vertical axis projection parameter, and generate a coordinate axis projection parameter corresponding to the projection vector.
Wherein the vertical plane comprises a plane transverse axis and a plane longitudinal axis; the projection coordinates of the projection vector comprise a horizontal axis coordinate value corresponding to a horizontal axis of a plane and a vertical axis coordinate value corresponding to a vertical axis of the plane;
the coordinate determining subunit is specifically configured to determine the fifth projection parameter as a first oblique axis projection parameter corresponding to the projection vector if the horizontal axis coordinate value is greater than or equal to the coordinate threshold value, and determine the sixth projection parameter as the first oblique axis projection parameter corresponding to the projection vector if the horizontal axis coordinate value is less than the coordinate threshold value;
the coordinate determining subunit is specifically configured to determine the seventh projection parameter as a second oblique axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is greater than or equal to the coordinate threshold, and determine the eighth projection parameter as the second oblique axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is less than the coordinate threshold;
the coordinate determining subunit is specifically configured to perform an addition operation on the first oblique axis projection parameter and the second oblique axis projection parameter, and generate a non-coordinate axis projection parameter corresponding to the projection vector.
Wherein the ratio value determining unit includes:
a parameter determining subunit, configured to determine auxiliary parameters of the projection vectors for the S output directions, respectively, based on the target output directions;
The proportion value determining subunit is used for determining candidate proportion values of the projection vectors respectively aiming at the S output directions according to the direction angles of the projection vectors respectively aiming at the S output directions;
and the proportion value determining subunit is used for determining direction proportion values of the projection vector for S output directions respectively according to the S auxiliary parameters and the S candidate proportion values.
The S output directions comprise an axial output direction and a non-axial output direction;
the parameter determination subunit is specifically configured to determine, if the target output direction is an axial output direction, the first auxiliary parameter as an auxiliary parameter of the projection vector for the target output direction, and determine the second auxiliary parameter as an auxiliary parameter of the projection vector for the S-1 output directions; the S-1 output directions are output directions except the target output direction in the S output directions;
the parameter determination subunit is specifically configured to determine, if the target output direction is a non-axial output direction, the first auxiliary parameter as an auxiliary parameter of the projection vector for the candidate output directions, and determine the second auxiliary parameter as an auxiliary parameter of the projection vector for the S-3 output directions; the candidate output directions comprise a target output direction and two output directions adjacent to the target output direction; the S-3 output directions are output directions other than the candidate output direction among the S output directions.
The S output directions comprise an axial output direction and a non-axial output direction; s output directions including output direction N i I is a positive integer not greater than S;
a proportion value determining subunit for determining the output direction N i For the axial output direction, the projection vector is directed to the output direction N i Comparing the direction angle of (2) with a first angle threshold to obtain a first comparison result, and generating a projection vector for the output direction N based on the first comparison result i Is a candidate ratio value of (2);
a proportion value determining subunit for determining the output direction N i For a non-axial output direction, the projection vector is directed to the output direction N i Comparing the direction angle of (2) with a second angle threshold to obtain a second comparison result, and generating a projection vector for the output direction N based on the second comparison result i Is a candidate ratio value of (2); the second angle threshold is less than the first angle threshold.
Wherein the proportion value determining subunit is specifically configured to, if the first comparison result indicates that the projection vector is directed to the output direction N i If the direction angle of the projection vector is greater than the first angle threshold, determining a first default ratio value as the projection vector for the output direction N i Is a candidate ratio value of (2);
a scale value determining subunit, specifically configured to, if the first comparison result indicates that the projection vector is directed to the output direction N i If the direction angle of (2) is less than or equal to the first angle threshold, determining that the projection vector is directed to the output direction N i An angle difference between the direction angle of (a) and the first angle threshold, determining a ratio between the angle difference and the first angle threshold as the projection vector for the output direction N i Is a candidate ratio value of (2).
Wherein the S auxiliary parameters include an output direction N i Corresponding auxiliary parameters, S candidate proportion values comprise an output direction N i Corresponding candidate ratio values;
a proportion value determining subunit for determining the output direction N i Corresponding auxiliary parameter and output direction N i Multiplying the corresponding candidate proportion values to generate projection vectors aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
The ratio value determining unit is specifically used for determining auxiliary parameters of projection vectors respectively aiming at S output directions based on the target output directions; s output directions including output direction N i I is a positive integer not greater than S;
a proportion value determining unit for determining the output direction N i The corresponding auxiliary parameter is the first auxiliary parameter, and the output direction N is aimed according to the projection vector i Determining the projection vector for the output direction N i Direction ratio value of (2);
a proportion value determining unit for determining the output direction N i The corresponding auxiliary parameter is a second auxiliary parameter, and then a second default proportion value is determined as the projection vector aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
Wherein the S output directions include an output direction N i I is a positive integer not greater than S; s direction proportional values include the output direction N i A corresponding direction proportional value;
parameter determination module for angle ratio value and output direction N i Multiplying the corresponding direction proportion value to generate an output direction N i Corresponding shaftTo the rotation parameters.
In one aspect, an embodiment of the present application provides a computer device, including: a processor and a memory;
the processor is connected to the memory, wherein the memory is configured to store a computer program, and when the computer program is executed by the processor, the computer device is caused to execute the method provided by the embodiment of the application.
In one aspect, the present application provides a computer readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided by the embodiment of the present application.
In one aspect, embodiments of the present application provide a computer program product comprising a computer program stored on a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the method provided by the embodiment of the present application.
In an embodiment of the application, the computer device may acquire a vertical plane perpendicular to the unit vector. Wherein the vertical plane includes S output directions; the unit vector is the same as the starting point and the direction of the default vector, and the default vector is used for indicating the initial state of the virtual part in the virtual object; further, the computer device may obtain a rotation vector corresponding to the unit vector, and determine an angle scale value of the rotation vector for the unit vector. The rotation vector is a vector obtained by spatially rotating the unit vector. Further, the computer device may acquire projection vectors of the rotation vectors on the vertical plane, determine direction proportion values of the projection vectors for the S output directions, respectively. Further, the computer device may determine the axial rotation parameters corresponding to the S output directions, respectively, according to the angle ratio value and the S direction ratio values. The S axial rotation parameters are used for driving the default vector to axially rotate to the position indicated by the rotation vector, and the driven default vector is used for indicating the virtual part to be updated from the initial state to the target state. Therefore, the embodiment of the application can determine the S output directions on the vertical plane perpendicular to the unit vector (namely the vertical plane perpendicular to the default vector), so that the rotation vector is obtained by spatially rotating the unit vector, the projection vector is obtained by projecting the rotation vector, and the axial rotation parameters corresponding to the default vector in the S output directions can be accurately determined, thereby jointly driving the default vector to axially rotate for the S output directions based on the S axial rotation parameters. The S output directions are in the same plane, so that the position of complete triggering of the event and the position of complete non-triggering of the event corresponding to the S output directions can be controlled, the events corresponding to the S output directions are not overlapped, and the S axial rotation parameters are not in conflict, so that the S axial rotation parameters can be matched together to drive the default vector to axially rotate to any position, and the accuracy of axial rotation of the default vector is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a scenario for data interaction according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a data processing method according to an embodiment of the present application;
fig. 4 is a schematic view of a scenario for acquiring a vertical plane according to an embodiment of the present application;
FIG. 5 is a schematic view of a spatial rotation scenario provided by an embodiment of the present application;
FIG. 6 is a schematic view of a planar projected scene provided by an embodiment of the present application;
FIG. 7 is a schematic view of a scenario illustrating axial rotation parameters according to an embodiment of the present application;
FIG. 8 is a schematic view of an axial rotation scenario provided by an embodiment of the present application;
FIG. 9 is a second flow chart of a data processing method according to an embodiment of the present application;
FIG. 10 is a flowchart illustrating a data processing method according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Specifically, referring to fig. 1, fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application. As shown in fig. 1, the network architecture may include a server 2000 and a cluster of terminal devices. Wherein the cluster of terminal devices may in particular comprise one or more terminal devices, the number of terminal devices in the cluster of terminal devices will not be limited here. As shown in fig. 1, the plurality of terminal devices may specifically include a terminal device 3000a, a terminal device 3000b, terminal devices 3000c, …, a terminal device 3000n; the terminal devices 3000a, 3000b, 3000c, …, 3000n may be directly or indirectly connected to the server 2000 through a wired or wireless communication manner, respectively, so that each terminal device may interact with the server 2000 through the network connection.
Wherein each terminal device in the terminal device cluster may include: smart phones, tablet computers, notebook computers, desktop computers, intelligent voice interaction devices, intelligent home appliances (e.g., smart televisions), wearable devices, vehicle terminals, aircraft and other intelligent terminals with data processing functions. The vehicle-mounted terminal can be terminal equipment in an intelligent traffic scene and an auxiliary driving scene. It should be understood that each terminal device in the terminal device cluster shown in fig. 1 may be installed with an application client having a data processing function, and when the application client runs in each terminal device, data interaction may be performed between the application client and the server 2000 shown in fig. 1.
The application client may specifically include: vehicle clients, smart home clients, entertainment clients (e.g., game clients), multimedia clients (e.g., video clients), social clients, and information-based clients (e.g., news clients), etc. The application client may be integrated in a certain client (e.g., a social client), and the application client may also be an independent client (e.g., a news client), which is not limited by the type of the application client in the embodiment of the present application.
The server 2000 may be a server corresponding to an application client, the server 2000 may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and an artificial intelligence platform.
For easy understanding, the embodiment of the present application may select one terminal device from the plurality of terminal devices shown in fig. 1 as the target terminal device. For example, in the embodiment of the present application, the terminal device 3000a shown in fig. 1 may be used as a target terminal device, and an application client having a data processing function may be installed in the target terminal device. At this time, the target terminal device may implement data interaction between the application client and the server 2000.
It should be appreciated that the computer device in embodiments of the present application may implement a skeletal drive (or joint drive) via cloud technology (skeletal drive may also be considered as movement of a mechanical structure), where a skeleton may be represented as a vector (e.g., a default vector), and a joint may represent a start point and an end point of the vector (e.g., a start point of the default vector). The skeletal drive (or joint drive) may represent a virtual object (the virtual object may be a virtual character, a virtual animal, or a virtual object in a virtual scene; for example, the virtual scene may be a game scene, an animation scene, the virtual object may be a dog in a game scene, a cartoon character in an animation scene), the virtual part (e.g., a cartoon character's arm) in the game scene may be updated from an initial state to a target state (e.g., the initial state may be a flat lift arm, the target state may be a raised arm, the virtual part being updated from the initial state to the target state may represent an arm being updated from flat lift to raised).
Cloud technology (Cloud technology) refers to a hosting technology that unifies serial resources such as hardware, software, networks and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied by the cloud computing business mode, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data need strong system rear shield support so as to be realized through cloud computing.
In particular, the computer device may obtain a default vector (i.e., a vector of motion) to be axially rotated, where the default vector may indicate an initial state of a virtual location in the virtual object. The default vector may be a vector at a default position without any motion. Further, the computer device may obtain a unit vector and a vertical plane perpendicular to the unit vector that are the same as the start point and the direction of the default vector. Wherein the vertical plane comprises S output directions. Further, the computer device may acquire a rotation vector obtained by spatially rotating the unit vector, and determine the axial rotation parameters corresponding to the S output directions, respectively, based on the rotation vector. The S axial rotation parameters are used for driving the default vector to axially rotate to the position indicated by the rotation vector, and the driven default vector is used for indicating the virtual part to be updated from the initial state to the target state.
The data processing method provided by the embodiment of the present application may be executed by the server 2000 (i.e., the computer device may be the server 2000), may be executed by the target terminal device (i.e., the computer device may be the target terminal device), or may be executed by both the server 2000 and the target terminal device.
When the data processing method is executed by the server 2000 and the target terminal device together, the target terminal device may spatially rotate the unit vector to obtain a rotation vector, generate S axial rotation parameters based on the rotation vector, and send the S axial rotation parameters to the server 2000, so that the server 2000 may drive the default vector to axially rotate through the S axial rotation parameters, thereby implementing updating the virtual part of the virtual object from the initial state to the target state.
Optionally, when the data processing method is executed by the server 2000, the server 2000 may spatially rotate the unit vector to obtain a rotation vector, further generate S axial rotation parameters based on the rotation vector, and drive the default vector to axially rotate through the S axial rotation parameters, thereby implementing updating the virtual part of the virtual object from the initial state to the target state.
Optionally, when the data processing method is executed by the target terminal device, the target terminal device may spatially rotate the unit vector to obtain a rotation vector, further generate S axial rotation parameters based on the rotation vector, and drive the default vector to axially rotate through the S axial rotation parameters, thereby implementing updating the virtual part of the virtual object from the initial state to the target state.
It will be appreciated that the above-described network framework may be applicable to game scenes, video scenes (e.g., animation scenes, movie scenes, television scenes), etc., and specific business scenes will not be listed here. For example, in a game scenario, the application client in the target terminal device may be a game client, the user corresponding to the target terminal device may manipulate the virtual object in the game client to perform a corresponding action, and the S axial rotation parameters may be parameters corresponding to a virtual portion (for example, a leg) when the virtual object jumps. The user corresponding to the target terminal device can control the virtual object to execute the jumping action, and at the moment, the virtual object in the game client can make the jumping action based on the S axial rotation parameters corresponding to the virtual part, so that the function of controlling the virtual object in the game client is realized. For another example, in a video scenario, the application client in the target terminal device may be a video client, the user corresponding to the target terminal device may manipulate the virtual object in the video client to perform a corresponding action, and the S axial rotation parameters may be parameters corresponding to a virtual part (for example, an arm) when the virtual object swings hands. The user corresponding to the target terminal device can control the virtual object to execute the waving action, at this time, the virtual object in the video client can make waving action based on the S axial rotation parameters corresponding to the virtual part, and the initial state and the target state can be states corresponding to the virtual part in the key frame of the video, thereby realizing the function of making the video in the video client.
In addition, the present application may also realize a blendshape (i.e., a mixed deformation, a fusion deformation), a color change (e.g., a surface color of the virtual part may change during movement of the virtual part based on the jumping motion), a map change (e.g., a surface texture of the virtual part may be changed from smooth to wrinkled during movement of the virtual part based on the jumping motion), a skin deformation (e.g., a deformation of a muscle, a change in wrinkles) (e.g., a deformation of a muscle of the virtual part may occur during movement of the virtual part based on the jumping motion), an on-body accessory follow (e.g., a necklace worn by the virtual object may move synchronously with the virtual part during movement of the virtual part based on the jumping motion), etc. during the corresponding movement of the virtual part of the virtual object, the virtual part may perform the corresponding movement.
For ease of understanding, further, please refer to fig. 2, fig. 2 is a schematic diagram of a scenario for data interaction according to an embodiment of the present application. The server 20a shown in fig. 2 may be the server 2000 in the embodiment corresponding to fig. 1, the terminal device 20b shown in fig. 2 may be the target terminal device in the embodiment corresponding to fig. 1, and the user corresponding to the terminal device 20b may be the user 20c. For ease of understanding, the embodiment of the present application will be described by taking an example in which the data processing method is executed by the terminal device 20b in a game scene.
As shown in fig. 2, the terminal device 20b may acquire a vertical plane perpendicular to the unit vector. The vertical plane may include S output directions, where S may be a positive integer, and the S output directions may specifically include output directions 22a, …, and output direction 22b; the embodiment of the present application is described by taking S equal to 8 as an example, and the embodiment of the present application is described by taking the direction angle between every two output directions of S equal to one another as an example, for example, when S is equal to 8, the direction angle between every two output directions is equal to 45 degrees (i.e., 360 divided by 8 is equal to 45 degrees).
Further, as shown in fig. 2, the terminal device 20b may spatially rotate the unit vector to obtain a rotation vector corresponding to the unit vector, and further determine an angle ratio value of the rotation vector to the unit vector. Wherein the angle scaling value may represent an offset of the rotation vector with respect to the unit vector.
Further, as shown in fig. 2, the terminal device 20b may perform plane projection on the rotation amount to obtain a projection vector of the rotation vector on a vertical plane, and further determine direction proportional values of the projection vector for the S output directions (i.e. the output directions 22a, …, and the output direction 22 b), respectively. The direction proportional value of the projection vector for the output direction 22a may be the direction proportional values 23a and …, and the direction proportional value of the projection vector for the output direction 22b may be the direction proportional value 23b; the S direction scale values may represent offsets of the rotation vector for the S output directions.
Further, as shown in fig. 2, the terminal device 20b may determine the axial rotation parameters corresponding to the S output directions respectively according to the angle proportion value and the S direction proportion values (i.e., the direction proportion values 23a, …, the direction proportion value 23 b), that is, determine the axial rotation parameters corresponding to the S output directions respectively according to the offset of the rotation vector for the unit vector and the offset of the rotation vector for the S output directions. The axial rotation parameter corresponding to the output direction 22a may be the axial rotation parameters 24a and …, and the axial rotation parameter corresponding to the output direction 22b may be the axial rotation parameter 24b. Further, the terminal device 20b may perform step S21, and transmit the axial rotation parameters 24a, …, and the axial rotation parameter 24b to the server 20a through step S21, so that the server 20a may perform step S22 after receiving S axial rotation parameters, and store the axial rotation parameters 24a, …, and the axial rotation parameter 24b to the game database 21a through step S22.
The game database 21a may be provided separately, or may be integrated on the server 20a, or may be integrated on another device or cloud, which is not limited herein. The game database 21a may include a plurality of databases, and the plurality of databases may include databases 21b, … and 21c shown in fig. 2, and the databases 21b, … and 21c may be used to store axial rotation parameters corresponding to different types of virtual objects. For example, the database 21b may be used to store the axial rotation parameters corresponding to the virtual character, and the database 21c may be used to store the axial rotation parameters corresponding to the virtual animal.
Therefore, the server 20a may store S axial rotation parameters corresponding to different types of virtual objects to different databases. For example, when the axial rotation parameters 24a, … and 24b are axial rotation parameters corresponding to virtual characters, the server 20a may store the axial rotation parameters 24a, … and 24b in the database 21b. The Database (Database), which can be considered as an electronic filing cabinet, is a place for storing electronic files, and users can perform operations such as adding, inquiring, updating, deleting and the like on the data in the files. A "database" is a collection of data stored together in a manner that can be shared with multiple users, with as little redundancy as possible, independent of the application.
As shown in fig. 2, the user 20c may open a game client in the terminal device 20b, and the terminal device 20b may obtain the axial rotation parameters 24a, …, the axial rotation parameters 24b from the server 20 a. Specifically, the server 20a may execute step S23, acquire the axial rotation parameters 24a, … and the axial rotation parameter 24b from the database 21b through step S23, further execute step S24, and return the axial rotation parameters 24a, … and the axial rotation parameter 24b to the terminal device 20b through step S24.
Further, the user 20c may input game instructions associated with the axial rotation parameters 24a, … and the axial rotation parameter 24b in the game client (e.g., the user 20c may input game instructions through a display screen of the terminal device 20 b), so that the terminal device 20b may obtain the game instructions input by the user 20c (e.g., the game instructions may be used to instruct a virtual object in the game client to perform a jump motion, the virtual object may include a virtual part), and drive the default vector to rotate axially to a position indicated by the rotation vector based on the axial rotation parameters 24a, … and the axial rotation parameter 24b in the game instructions, to obtain the driven default vector. The default vector may be used to indicate an initial state (e.g., a state before performing a jump motion) of the virtual part, where the default vector is the same as a starting point and a direction of the unit vector, and the default vector after driving is used to indicate that the virtual part is updated from the initial state to a target state (e.g., a state after performing the jump motion), that is, the default vector after driving is used to indicate the target state of the virtual part.
Therefore, the embodiment of the application can determine the S output directions in the vertical plane vertical to the unit vector, and further determine the axial rotation parameters corresponding to the S output directions respectively based on the rotation of the unit vector and the projection of the rotation amount. Because the S output directions all belong to the vertical plane, the application can accurately drive the default vector associated with the unit vector to axially rotate while ensuring that the S output directions are not mutually influenced (namely, the events corresponding to the S output directions are not mutually influenced), thereby improving the accuracy of axially rotating the default vector.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a data processing method according to an embodiment of the application. The method may be performed by a server, or may be performed by a terminal device, or may be performed by a server and a terminal device together, where the server may be the server 20a in the embodiment corresponding to fig. 2, and the terminal device may be the terminal device 20b in the embodiment corresponding to fig. 2. For easy understanding, the embodiment of the present application will be described by taking the method performed by the terminal device as an example. The data processing method may include the following steps S101 to S104:
step S101, a vertical plane vertical to a unit vector is obtained;
the vertical plane includes S output directions, where S may be a positive integer, and in the embodiment of the present application, S is equal to 8 and illustrated by using the same or different direction angles between every two output directions in the S output directions, and in the embodiment of the present application, the same direction angle between every two output directions in the S output directions is illustrated by using the same example; the vector length of the unit vector is equal to the distance from the start point of the unit vector to the vertical plane, and the unit vector may also be referred to as a positioning vector, and the embodiment of the present application does not limit the vector length of the positioning vector (i.e., the unit vector) (for example, the vector length of the unit vector may be equal to 1 unit, and the distance from the start point of the unit vector to the vertical plane is equal to 1 unit); the unit vector is the same as the default vector in both the start point and the direction, and the default vector is used for indicating the initial state of the virtual part in the virtual object. Optionally, the distance from the start point of the unit vector to the vertical plane is not limited in the embodiment of the present application, and for convenience of understanding, the embodiment of the present application is described by taking as an example that the vector length of the unit vector is equal to the distance from the start point of the unit vector to the vertical plane.
Wherein the terminal device may set S direction anchor points (e.g., 8 direction anchor points) on the vertical plane, which may be used to determine S output directions in the vertical plane. Wherein, a direction positioning point can be used for determining an output direction on a vertical plane (the output direction can represent the direction from the intersection point of a plane transverse axis and a plane longitudinal axis to the direction positioning point, and the plane transverse axis and the plane longitudinal axis can be coordinate axes in the vertical plane); the vertical plane can be regarded as a cartesian coordinate system, and a cartesian coordinate system in which two axes (i.e., a plane transverse axis and a plane longitudinal axis) are perpendicular to each other is called a cartesian rectangular coordinate system.
For ease of understanding, please refer to fig. 4, fig. 4 is a schematic view of a scenario for obtaining a vertical plane according to an embodiment of the present application. The vector anchor point 43a shown in fig. 4 may be an end point of a unit vector, an intersection point of the coordinate axis 41a and the coordinate axis 41b may be a start point of the unit vector, the start point of the unit vector may be an origin point, and the coordinate axis 40c may be a coordinate axis to which the unit vector belongs (i.e., the coordinate axis 40c coincides with the unit vector).
As shown in fig. 4, the terminal device may acquire a vertical plane perpendicular to the unit vector, and the vertical plane may be a plane formed by a coordinate axis 40a (i.e., a plane transverse axis 40 a) and a coordinate axis 40b (i.e., a plane longitudinal axis 40 b), where a distance from a start point of the unit vector (i.e., an intersection point of the coordinate axis 41a and the coordinate axis 41 b) to the vertical plane is equal to a distance from the start point of the unit vector to an intersection point of the coordinate axis 40a and the coordinate axis 40 b.
As shown in fig. 4, the vertical plane may include S direction anchor points (e.g., 8 direction anchor points), and the 8 direction anchor points may include a direction anchor point 42a, a direction anchor point 42b, a direction anchor point 42c, a direction anchor point 42d, a direction anchor point 42e, a direction anchor point 42f, a direction anchor point 42g, and a direction anchor point 42h. The output direction corresponding to the direction positioning point 42a may be the direction from the intersection point of the coordinate axis 40a and the coordinate axis 40b to the direction positioning point 42a, …, and the output direction corresponding to the direction positioning point 42h may be the direction from the intersection point of the coordinate axis 40a and the coordinate axis 40b to the direction positioning point 42h.
Step S102, a rotation vector corresponding to the unit vector is obtained, and an angle proportion value of the rotation vector for the unit vector is determined;
specifically, the terminal device may spatially rotate the unit vector to obtain a spatially rotated unit vector, and determine the spatially rotated unit vector as a rotation vector corresponding to the unit vector (i.e., the rotation vector is a vector obtained by spatially rotating the unit vector). Further, the terminal device may acquire a spatial rotation angle between the unit vector and the rotation vector (i.e., an angle between the unit vector and the rotation vector), and determine a ratio between the spatial rotation angle and the rotation angle threshold as an angle ratio value of the rotation vector to the unit vector.
Wherein the rotation angle threshold may represent a maximum value of the spatial rotation angle (i.e. a maximum value of the angle between the two vectors), the maximum value of the spatial rotation angle may be equal to 180 degrees, i.e. the rotation angle threshold may be equal to 180 degrees. For example, when the spatial rotation angle between the unit vector and the rotation vector is equal to 90 degrees, the angle ratio value may be equal to 0.5 (i.e., 90/180).
For ease of understanding, please refer to fig. 5, fig. 5 is a schematic view of a spatial rotation scenario provided by an embodiment of the present application. The view (e.g., top view) shown in fig. 5 may include a coordinate axis 51a and a coordinate axis 51b, the coordinate axis 51a may be the coordinate axis 41a in the embodiment corresponding to fig. 4, the coordinate axis 51b may be the coordinate axis 40c in the embodiment corresponding to fig. 4, and the intersection point of the coordinate axis 51a and the coordinate axis 51b may be the origin. The direction anchor points 50a may be the direction anchor points 42a, 42h, and 42g in the embodiment corresponding to fig. 4, the direction anchor points 50b may be the direction anchor points 42b and 42f in the embodiment corresponding to fig. 4, the direction anchor points 50c may be the direction anchor points 42c, 42d, and 42e in the embodiment corresponding to fig. 4, and the vector anchor points 52a may be the vector anchor points 43a in the embodiment corresponding to fig. 4.
As shown in fig. 5, the intersection of coordinate axis 51a and coordinate axis 51b may be the start of a unit vector (i.e., unit vector 52 b), and vector anchor point 52a may be the end of a unit vector (i.e., unit vector 52 b). As shown in fig. 5, the terminal device may spatially rotate the unit vector 52b to obtain a rotation vector 52c. The vector positioning point 52a may be spaced from a vertical plane formed by S direction positioning points by a distance of one diameter with respect to a skeleton center point (i.e., a spherical center point), where the radius of the circle is a vector length (e.g., one unit) of the unit vector, so that the rotation range (i.e., a spatial rotation angle) of the skeleton (i.e., the unit vector 52 b) may be controlled between 0 and 360 degrees, thereby realizing a value for driving a full angle (i.e., 360 degrees); in other words, the unit vector 52b may always rotate along the spherical surface with the spherical center point (i.e., origin) as the center.
Step S103, obtaining projection vectors of the rotation vectors on a vertical plane, and determining direction proportion values of the projection vectors respectively aiming at S output directions;
specifically, the terminal device may perform plane projection on the rotation amount to obtain a projection vector of the rotation vector on a vertical plane. Further, the terminal device may determine, according to the projection coordinates of the projection vector, a target output direction corresponding to the projection vector from among the S output directions. Further, the terminal device may determine direction proportion values of the projection vectors for the S output directions, respectively, based on the target output directions.
The specific process of determining the target output direction corresponding to the projection vector in the S output directions by the terminal device according to the projection coordinates of the projection vector may be referred to as description of step S1032 in the embodiment corresponding to fig. 9 below; for a specific process of determining the direction proportion values of the projection vectors for the S output directions based on the target output directions, the terminal device may refer to the description of step S1033 in the embodiment corresponding to fig. 9 and the description of steps S10331-S10333 in the embodiment corresponding to fig. 10.
For ease of understanding, please refer to fig. 6, fig. 6 is a schematic view of a planar projection scene according to an embodiment of the present application. The direction positioning point 62a shown in fig. 6 may be the direction positioning point 42a in the embodiment corresponding to fig. 4, the direction positioning point 62b may be the direction positioning point 42b in the embodiment corresponding to fig. 4, the direction positioning point 62c may be the direction positioning point 42c in the embodiment corresponding to fig. 4, the direction positioning point 62d may be the direction positioning point 42d in the embodiment corresponding to fig. 4, the direction positioning point 62e may be the direction positioning point 42e in the embodiment corresponding to fig. 4, the direction positioning point 62f may be the direction positioning point 42f in the embodiment corresponding to fig. 4, the direction positioning point 62g may be the direction positioning point 42g in the embodiment corresponding to fig. 4, and the direction positioning point 62h may be the direction positioning point 42h in the embodiment corresponding to fig. 4.
The output direction 61a may be an output direction corresponding to the direction positioning point 62a, the output direction 61b may be an output direction corresponding to the direction positioning point 62b, the output direction 61c may be an output direction corresponding to the direction positioning point 62c, the output direction 61d may be an output direction corresponding to the direction positioning point 62d, the output direction 61e may be an output direction corresponding to the direction positioning point 62e, the output direction 61f may be an output direction corresponding to the direction positioning point 62f, the output direction 61g may be an output direction corresponding to the direction positioning point 62g, and the output direction 61h may be an output direction corresponding to the direction positioning point 62 h.
The coordinate axis 60a shown in fig. 6 may be the coordinate axis 51b in the embodiment corresponding to fig. 5, the unit vector 60b may be the unit vector 52b in the embodiment corresponding to fig. 5, and the rotation vector 60c may be the rotation vector 52c in the embodiment corresponding to fig. 5. The output direction 61b and the output direction 61f may constitute the coordinate axis 40a in the embodiment corresponding to fig. 4 (for example, the output direction 61b may be a positive direction of the coordinate axis 40a, the output direction 61f may be a negative direction of the coordinate axis 40 a), the output direction 61d and the output direction 61h may constitute the coordinate axis 40b in the embodiment corresponding to fig. 4 (for example, the output direction 61d may be a positive direction of the coordinate axis 40b, the output direction 61h may be a negative direction of the coordinate axis 40 b), and the output direction 61b, the output direction 61f, the output direction 61d and the output direction 61h may be located on a vertical plane.
As shown in fig. 6, the terminal device may perform planar projection on the rotation vector 60c to obtain a projection vector 60d of the rotation vector 60c on a vertical plane. The projection vector 60d may have projection coordinates, and the projection coordinates may include a horizontal axis coordinate value 63a corresponding to a horizontal axis (for example, a coordinate axis formed by the output direction 61d and the output direction 61 h) in a vertical plane and a vertical axis coordinate value 63b corresponding to a vertical axis (for example, a coordinate axis formed by the output direction 61b and the output direction 61 f) in a vertical plane.
Similarly, the axes of the S output directions other than the horizontal and vertical axes may constitute a planar oblique axis, where the planar oblique axis may include a first planar oblique axis and a second planar oblique axis. For example, the output direction 61c and the output direction 61g may constitute a first plane oblique axis in a vertical plane, and the output direction 61a and the output direction 61e may constitute a second plane oblique axis in a vertical plane.
Wherein the S output directions may include an output direction N i Where i may be a positive integer no greater than S; s direction proportional values include the output direction N i Corresponding direction proportional value.
Step S104, according to the angle proportion value and the S direction proportion values, determining the axial rotation parameters corresponding to the S output directions respectively.
Specifically, the terminal device may output the angle ratio value and the output direction N i Multiplying the corresponding direction proportion value to generate an output direction N i Corresponding axial rotation parameters. The S axial rotation parameters are used for driving the default vector to axially rotate to the position indicated by the rotation vector, and the driven default vector is used for indicating the virtual part to be updated from the initial state to the target state. In other words, the S axial rotation parameters may be used to locate the position of the default vector for axial rotation; the S output directions respectively correspond to different events (wherein different events can represent different actions), and the S axial rotation parameters can be respectively used for determining actions corresponding to the S events. Wherein S axesThe forward rotation parameters are real numbers which are more than or equal to 0, and the S axial rotation parameters are real numbers which are less than or equal to 1.
For ease of understanding, please refer to fig. 7, fig. 7 is a schematic diagram of a scenario in which axial rotation parameters are displayed according to an embodiment of the present application. The Front (i.e., front), back (i.e., up), up (i.e., bottom), and down (i.e., bottom) of fig. 7 may respectively represent different output directions, for example, the Front may be the output direction 61h in the embodiment corresponding to fig. 6, the Back may be the output direction 61d in the embodiment corresponding to fig. 6, the top may be the output direction 61b in the embodiment corresponding to fig. 6, and the Bottom may be the output direction 61f in the embodiment corresponding to fig. 6.
Accordingly, the front upper part may be the output direction 61a in the embodiment corresponding to fig. 6, the rear upper part may be the output direction 61c in the embodiment corresponding to fig. 6, the front lower part may be the output direction 61g in the embodiment corresponding to fig. 6, and the rear lower part may be the output direction 61e in the embodiment corresponding to fig. 6.
As shown in fig. 7, the front drive (i.e., the axial rotation parameter corresponding to the output direction 61 h) may be equal to 0.147, the upper drive (i.e., the axial rotation parameter corresponding to the output direction 61 b) may be equal to 0.112, the rear drive (i.e., the axial rotation parameter corresponding to the output direction 61 d) may be equal to 0, the lower drive (i.e., the axial rotation parameter corresponding to the output direction 61 f) may be equal to 0, the front upper drive (i.e., the axial rotation parameter corresponding to the output direction 61 a) may be equal to 0.224, the rear upper drive (i.e., the axial rotation parameter corresponding to the output direction 61 c) may be equal to 0, the front lower drive (i.e., the axial rotation parameter corresponding to the output direction 61 g) may be equal to 0.
It should be appreciated that the parting line (i.e., the planar transverse axis, the planar longitudinal axis, and the planar oblique axis) may be taken as the location of the maximum output value, gradually decreasing toward the parting line side to the planar transverse axis and the planar longitudinal axis, i.e., from a maximum value of 1 to a minimum value of 0. Referring to fig. 6 again, for example, when the projection vector 60d is located in the output direction 61b, the axial rotation parameter corresponding to the output direction 61b is equal to 1, and the axial rotation parameters corresponding to the output directions other than the output direction 61b among the s output directions are equal to 0. At this time, in the process from the output direction 61b to the output direction 61d (i.e., the output direction on the plane transverse axis), the axial rotation parameter corresponding to the output direction 61b is changed from 1 to 0; in the process from the output direction 61b to the output direction 61h (i.e., the output direction on the horizontal axis of the plane), the axial rotation parameter corresponding to the output direction 61b changes from 1 to 0. For another example, when the projection vector 60d is located in the output direction 61a, the axial rotation parameter corresponding to the output direction 61a is equal to 1, and the axial rotation parameters corresponding to the output directions other than the output direction 61a, the output direction 61b, and the output direction 61h among the s output directions are equal to 0. At this time, in the process from the output direction 61a to the output direction 61b (i.e., the output direction on the plane longitudinal axis), the axial rotation parameter corresponding to the output direction 61a is changed from 1 to 0; in the process from the output direction 61a to the output direction 61h (i.e., the output direction on the horizontal axis of the plane), the axial rotation parameter corresponding to the output direction 61a changes from 1 to 0.
Therefore, when the projection vector 60d is located in the output direction 61b, the output direction 61d, the output direction 61f, or the output direction 61h, 1 of the S axial rotation parameters is equal to 1, and S-1 axial rotation parameters is equal to 0; alternatively, when the projection vector 60d is located between the output direction 61b and the output direction 61d, between the output direction 61d and the output direction 61f, between the output direction 61f and the output direction 61h, or between the output direction 61b and the output direction 61h, 3 of the S axial rotation parameters have values (i.e., are not 0), and the S-3 axial rotation parameters are equal to 0.
For ease of understanding, please refer to fig. 8, fig. 8 is a schematic view of an axial rotation scenario provided by an embodiment of the present application. As shown in fig. 8, the virtual part of the virtual object may be an arm, the default vector 80b may be used to indicate an initial state 81a of the virtual part (e.g., the initial state 81a indicates that the arm is in a flat state), the vertical plane 80a is perpendicular to the default vector 80b, and the vertical plane 80a may include S output directions. In addition, the virtual object may further include other virtual parts besides the arm, and different virtual parts may correspond to different default vectors, and vertical planes to which the different default vectors respectively correspond are different.
As shown in fig. 8, the default vector 80b may be driven to axially rotate to a position indicated by the rotation vector by the axial rotation parameters corresponding to the S output directions, respectively (S axial rotation parameters are determined by the rotation vector), at which time the virtual part may be updated from the initial state 81a to the target state 81b (for example, the target state 81b may represent a sagging state in which the arm is relatively flat). The position indicated by the axial rotation to the rotation vector is the position of the default vector in the target state 81 b.
Therefore, the embodiment of the present application provides a spatial positioning method for solving axial rotation of three directions (i.e., directions corresponding to three coordinate axes in a three-dimensional space, for example, the three coordinate axes may be the coordinate axis 40c in the embodiment corresponding to fig. 4, the coordinate axis 40b in the embodiment corresponding to fig. 4, and the coordinate axis 40a in the embodiment corresponding to fig. 4), where the default vector axially rotates in the three directions, and the present application can provide accurate positioning output values (i.e., S axial rotation parameters) regardless of the rotation sequence.
Therefore, the embodiment of the application can determine the S output directions on the vertical plane perpendicular to the unit vector (namely the vertical plane perpendicular to the default vector), so that the rotation vector is obtained by spatially rotating the unit vector, the projection vector is obtained by projecting the rotation vector, and the axial rotation parameters corresponding to the default vector in the S output directions can be accurately determined, thereby jointly driving the default vector to axially rotate for the S output directions based on the S axial rotation parameters. The S output directions are in the same plane, so that the position of complete triggering of the event and the position of complete non-triggering of the event corresponding to the S output directions can be controlled, the events corresponding to the S output directions are not overlapped, and the S axial rotation parameters are not in conflict, so that the S axial rotation parameters can be matched together to drive the default vector to axially rotate to any position, and the accuracy of axial rotation of the default vector is improved. In addition, the embodiment of the application can ensure that when the default vector axially rotates in the S output directions, S axial rotation parameters can be continuously changed without interruption, so that the axial rotation of the default vector is not inconsistent, and the accuracy of the axial rotation of the default vector is further improved. Meanwhile, the embodiment of the application has the characteristics of light weight and small file operation pressure.
Further, referring to fig. 9, fig. 9 is a second flowchart of a data processing method according to an embodiment of the present application. The data processing method may include the following steps S1031 to S1033, where steps S1031 to S1033 are a specific embodiment of step S103 in the embodiment corresponding to fig. 3.
Step S1031, carrying out plane projection on the rotation quantity to obtain a projection vector of the rotation vector on a vertical plane;
step S1032, determining a target output direction corresponding to the projection vector in the S output directions according to the projection coordinates of the projection vector;
in particular, the terminal device may determine coordinates of an end point of the projection vector as projection coordinates of the projection vector. Further, the terminal device may determine coordinate axis projection parameters corresponding to the projection vectors according to projection coordinates of the projection vectors; the terminal device may determine, according to the projection coordinates of the projection vector, non-coordinate axis projection parameters corresponding to the projection vector. Further, the terminal device may perform an addition operation on the coordinate axis projection parameter and the non-coordinate axis projection parameter, to generate an output parameter corresponding to the projection vector. Further, the terminal device may determine, according to the output parameter, a target output direction corresponding to the projection vector from the S output directions. According to the embodiment of the application, the output parameters corresponding to the projection vectors can be determined according to the coordinate axis projection parameters and the non-coordinate axis projection parameters, the target output direction corresponding to the projection vectors can be accurately determined according to the output parameters, and the position of the rotation vectors can be accurately positioned according to the target output direction.
Wherein, the vertical plane includes a horizontal axis (i.e., X-axis, for example, a coordinate axis formed by the output direction 61d and the output direction 61h in the embodiment corresponding to fig. 6) and a vertical axis (i.e., Y-axis, for example, a coordinate axis formed by the output direction 61b and the output direction 61f in the embodiment corresponding to fig. 6), and the projection coordinates of the projection vector include a horizontal axis coordinate value corresponding to the horizontal axis (for example, a horizontal axis coordinate value 63a in the embodiment corresponding to fig. 6) and a vertical axis coordinate value corresponding to the vertical axis (for example, a vertical axis coordinate value 63b in the embodiment corresponding to fig. 6); the coordinate axis projection parameters may represent a likelihood that the end point of the projection vector is exactly on-axis, and the non-coordinate axis projection parameters may represent a likelihood that the end point of the projection vector is not on-axis. The S directional anchor points may pass through the positive and negative axes of the plane transverse axis, the positive and negative axes of the plane longitudinal axis, and four quadrants formed by the plane longitudinal axis and the plane transverse axis (i.e., the plane oblique axis between the plane longitudinal axis and the plane transverse axis).
In other words, the terminal device may project the projection vector onto the plane transverse axis, obtain the transverse axis projection vector, and determine the vector length of the transverse axis projection vector as the transverse axis coordinate axis (i.e., the abscissa of the end point of the projection vector). If the transverse axis projection vector is on the positive axis of the plane transverse axis, the vector length of the transverse axis projection vector is a positive value; if the transverse axis projection vector is on the negative axis of the plane transverse axis, the vector length of the transverse axis projection vector is negative. Similarly, the terminal device may project the projection vector onto the longitudinal axis of the plane, to obtain a longitudinal projection vector, and determine the vector length of the longitudinal projection vector as the longitudinal axis coordinate axis (i.e. the ordinate of the endpoint of the projection vector). If the vertical axis projection vector is on the positive axis of the plane vertical axis, the vector length of the vertical axis projection vector is a positive value; if the vertical axis projection vector is on the negative axis of the vertical axis of the plane, the vector length of the vertical axis projection vector is negative.
It can be understood that the specific process of determining the coordinate axis projection parameters corresponding to the projection vector by the server according to the projection coordinates of the projection vector can be described as follows: if the coordinate value of the horizontal axis is equal to the coordinate threshold value, the terminal equipment can determine the first projection parameter as the horizontal axis projection parameter corresponding to the projection vector; optionally, if the abscissa value is not equal to the coordinate threshold, the terminal device may determine the second projection parameter as the abscissa projection parameter corresponding to the projection vector. If the vertical axis coordinate value is equal to the coordinate threshold value, the terminal equipment can determine the third projection parameter as a vertical axis projection parameter corresponding to the projection vector; optionally, if the ordinate value is not equal to the coordinate threshold, the terminal device may determine the fourth projection parameter as the ordinate projection parameter corresponding to the projection vector. Further, the terminal device may perform an addition operation on the horizontal axis projection parameter and the vertical axis projection parameter, to generate a coordinate axis projection parameter corresponding to the projection vector. According to the embodiment of the application, the coordinate axis projection parameters corresponding to the projection vectors can be accurately generated according to the horizontal axis projection parameters and the vertical axis projection parameters.
Wherein the coordinate threshold may be equal to 0. At this time, if the coordinate value of the horizontal axis is equal to the coordinate threshold value, the end point of the projection vector is indicated on the vertical axis of the plane; optionally, if the vertical axis coordinate value is equal to the coordinate threshold value, the end point of the projection vector is indicated on the horizontal axis of the plane.
It can be appreciated that the specific process of determining, by the server, the non-coordinate axis projection parameter corresponding to the projection vector according to the projection coordinate of the projection vector can be described as follows: if the coordinate value of the transverse axis is greater than or equal to the coordinate threshold value, the terminal equipment can determine the fifth projection parameter as a first oblique axis projection parameter corresponding to the projection vector; optionally, if the horizontal axis coordinate value is smaller than the coordinate threshold, the terminal device may determine the sixth projection parameter as the first oblique axis projection parameter corresponding to the projection vector. If the vertical axis coordinate value is greater than or equal to the coordinate threshold value, the terminal equipment can determine the seventh projection parameter as a second oblique axis projection parameter corresponding to the projection vector; optionally, if the vertical axis coordinate value is smaller than the coordinate threshold, the terminal device may determine the eighth projection parameter as the second oblique axis projection parameter corresponding to the projection vector. Further, the terminal device may perform an addition operation on the first oblique axis projection parameter and the second oblique axis projection parameter, to generate a non-coordinate axis projection parameter corresponding to the projection vector. According to the embodiment of the application, the non-coordinate axis projection parameters corresponding to the projection vectors can be accurately generated according to the first oblique axis projection parameters and the second oblique axis projection parameters.
Wherein the coordinate threshold may be equal to 0. At this time, if the coordinate value of the horizontal axis is greater than or equal to the coordinate threshold, the end point of the projection vector is indicated to be in the first quadrant or the fourth quadrant; optionally, if the horizontal axis coordinate value is smaller than the coordinate threshold, the end point of the projection vector is indicated in the second quadrant or the third quadrant. Similarly, if the vertical axis coordinate value is greater than or equal to the coordinate threshold value, the end point of the projection vector is indicated to be in the first quadrant or the second quadrant; optionally, if the ordinate value is smaller than the coordinate threshold, it indicates that the end point of the projection vector is in the third quadrant or the fourth quadrant. The first quadrant may be a quadrant formed by a positive axis of the planar horizontal axis and a positive axis of the planar vertical axis, the second vector may be a vector formed by a positive axis of the planar vertical axis and a negative axis of the planar horizontal axis, the third quadrant may be a quadrant formed by a negative axis of the planar horizontal axis and a negative axis of the planar vertical axis, and the fourth quadrant may be a quadrant formed by a positive axis of the planar horizontal axis and a negative axis of the planar vertical axis.
It may be understood that the terminal device may compare the output parameter with candidate parameters corresponding to the S output directions, determine a candidate parameter identical to the output parameter among the S candidate parameters, and determine an output direction corresponding to the candidate parameter identical to the output parameter as the target output direction corresponding to the projection vector. In other words, the terminal device may search for an output parameter from candidate parameters corresponding to the S output directions, and determine an output direction corresponding to the output parameter (i.e., the searched candidate parameter) as the target output direction corresponding to the projection vector.
The candidate parameters corresponding to the S output directions respectively are different, and the specific values of the first projection parameter, the second projection parameter, the third projection parameter, the fourth projection parameter, the fifth projection parameter, the sixth projection parameter, the seventh projection parameter and the eighth projection parameter may be the same or different. Therefore, since the candidate parameters corresponding to the S output directions are different, the target output direction corresponding to the projection vector can be stably determined in the S output directions by the output parameters, and the position of the rotation vector in space can be accurately described by the output parameters.
For example, the first projection parameter may be equal to 0.5 (i.e., 0.5 if the horizontal axis coordinate value is equal to 0), the second projection parameter may be equal to 0 (i.e., 0 if the horizontal axis coordinate value is not equal to 0), the third projection parameter may be equal to 1 (i.e., 1 if the vertical axis coordinate value is equal to 0), the fourth projection parameter may be equal to 0 (i.e., 0 if the vertical axis coordinate value is not equal to 0), the fifth projection parameter may be equal to 6 (i.e., 6 if the horizontal axis coordinate value is greater than or equal to 0), the sixth projection parameter may be equal to 2 (i.e., 2 if the horizontal axis coordinate value is less than 0), the seventh projection parameter may be equal to 3 (i.e., 3 if the vertical axis coordinate value is greater than or equal to 0), and the eighth projection parameter may be equal to 1 (i.e., 1 if the vertical axis coordinate value is less than 0). At this time, if the end point of the projection vector is on the positive axis X (i.e., the positive axis of the horizontal plane axis), the terminal device may perform an addition operation (i.e., 0+1+6+3=10) on the second projection parameter, the third projection parameter, the fifth projection parameter, and the seventh projection parameter, to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is on the X negative axis (i.e., the negative axis of the horizontal plane axis), the terminal device may perform an addition operation (i.e., 0+1+2+3=6) on the second projection parameter, the third projection parameter, the sixth projection parameter, and the seventh projection parameter, to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is on the Y positive axis (i.e., the positive axis of the longitudinal axis of the plane), the terminal device may perform an addition operation (i.e., 0.5+0+6+3=9.5) on the first projection parameter, the fourth projection parameter, the fifth projection parameter and the seventh projection parameter, so as to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is on the negative Y axis (i.e., the negative axis of the longitudinal axis of the plane), the terminal device may perform an addition operation (i.e., 0.5+0+6+1=7.5) on the first projection parameter, the fourth projection parameter, the fifth projection parameter and the eighth projection parameter to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the first quadrant, the terminal device may perform an addition operation (i.e. 0+0+6+3=9) on the second projection parameter, the fourth projection parameter, the fifth projection parameter and the seventh projection parameter, so as to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the second quadrant, the terminal device may perform an addition operation (i.e. 0+0+2+3=5) on the second projection parameter, the fourth projection parameter, the sixth projection parameter and the seventh projection parameter, so as to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the third quadrant, the terminal device may perform an addition operation (i.e. 0+0+2+1=3) on the second projection parameter, the fourth projection parameter, the sixth projection parameter and the eighth projection parameter, so as to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the fourth quadrant, the terminal device may perform an addition operation (i.e. 0+0+6+1=7) on the second projection parameter, the fourth projection parameter, the fifth projection parameter and the eighth projection parameter, so as to generate an output parameter corresponding to the projection vector. The candidate parameters corresponding to the S output directions may include 10, 6, 9.5, 7.5, 9, 5, 3, and 7, respectively.
For another example, the first projection parameter may be equal to 6 (i.e., output 6 if the horizontal axis coordinate value is equal to 0), the second projection parameter may be equal to 1 (i.e., output 1 if the horizontal axis coordinate value is not equal to 0), the third projection parameter may be equal to 5 (i.e., output 5 if the vertical axis coordinate value is equal to 0), the fourth projection parameter may be equal to 2 (i.e., output 2 if the vertical axis coordinate value is not equal to 0), the fifth projection parameter may be equal to 5 (i.e., output 5 if the horizontal axis coordinate value is greater than or equal to 0), the sixth projection parameter may be equal to 3 (i.e., output 3 if the horizontal axis coordinate value is less than 0), the seventh projection parameter may be equal to 3 (i.e., output 3 if the vertical axis coordinate value is greater than or equal to 0), and the eighth projection parameter may be equal to 2 (i.e., output 2 if the vertical axis coordinate value is less than 0). At this time, if the end point of the projection vector is on the positive axis X (i.e., the positive axis of the horizontal plane axis), the terminal device may perform an addition operation (i.e., 1+5+5+3=14) on the second projection parameter, the third projection parameter, the fifth projection parameter, and the seventh projection parameter, to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is on the X negative axis (i.e., the negative axis of the horizontal plane axis), the terminal device may perform an addition operation (i.e., 1+5+3+3=12) on the second projection parameter, the third projection parameter, the sixth projection parameter, and the seventh projection parameter, to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is on the Y positive axis (i.e., the positive axis of the plane longitudinal axis), the terminal device may perform an addition operation (i.e., 6+2+5+3=16) on the first projection parameter, the fourth projection parameter, the fifth projection parameter, and the seventh projection parameter, to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is on the negative Y axis (i.e., the negative axis of the longitudinal axis of the plane), the terminal device may perform an addition operation (i.e., 6+2+5+2=15) on the first projection parameter, the fourth projection parameter, the fifth projection parameter and the eighth projection parameter to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the first quadrant, the terminal device may perform an addition operation (i.e. 1+2+5+3=11) on the second projection parameter, the fourth projection parameter, the fifth projection parameter and the seventh projection parameter, so as to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the second quadrant, the terminal device may perform an addition operation (i.e. 1+2+3+3=9) on the second projection parameter, the fourth projection parameter, the sixth projection parameter and the seventh projection parameter, to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the third quadrant, the terminal device may perform an addition operation (i.e. 1+2+3+2=8) on the second projection parameter, the fourth projection parameter, the sixth projection parameter and the eighth projection parameter, so as to generate an output parameter corresponding to the projection vector; if the end point of the projection vector is in the fourth quadrant, the terminal device may perform an addition operation (i.e. 1+2+5+2=10) on the second projection parameter, the fourth projection parameter, the fifth projection parameter and the eighth projection parameter, so as to generate an output parameter corresponding to the projection vector. The candidate parameters corresponding to the S output directions may include 14, 12, 16, 15, 11, 9, 8, and 10.
Step S1033, based on the target output directions, determines direction proportion values of the projection vectors for the S output directions, respectively.
Specifically, the terminal device may determine auxiliary parameters of the projection vector for the S output directions, respectively, based on the target output directions. Further, the terminal device may determine candidate proportion values of the projection vectors for the S output directions according to the direction angles of the projection vectors for the S output directions, respectively. Further, the terminal device may determine, according to the S auxiliary parameters and the S candidate scale values, direction scale values of the projection vector for the S output directions, respectively.
Wherein the S output directions include an axial output direction and a non-axial output direction, the axial output direction may represent an output direction with respect to the planar horizontal axis and the planar vertical axis, and the non-axial output direction may be a non-output direction with respect to the planar horizontal axis and the planar vertical axis (i.e., the non-axial output direction may be an output direction other than the axial output direction among the S output directions). It should be appreciated that the specific process of the server determining the auxiliary parameters of the projection vector for the S output directions based on the target output directions may be described as: if the target output direction is an axial output direction, the terminal device may determine a first auxiliary parameter (e.g., the first auxiliary parameter may be equal to 1) as an auxiliary parameter of the projection vector for the target output direction, and a second auxiliary parameter (e.g., the second auxiliary parameter may be equal to 0) as an auxiliary parameter of the projection vector for S-1 output directions. Wherein the S-1 output directions are output directions other than the target output direction among the S output directions. Optionally, if the target output direction is a non-axial output direction, the terminal device may determine the first auxiliary parameter as an auxiliary parameter of the projection vector for the candidate output directions, and determine the second auxiliary parameter as an auxiliary parameter of the projection vector for the S-3 output directions. Wherein the candidate output directions include a target output direction and two output directions adjacent to the target output direction (i.e., the number of candidate output directions is equal to 3), and the S-3 output directions are output directions other than the candidate output directions among the S output directions.
For ease of understanding, referring again to fig. 6, the output directions 61b, 61d, 61f, and 61h shown in fig. 6 may be axial output directions (the output directions 61b and 61f may be output directions for the vertical axis of the plane, the output directions 61d and 61h may be output directions for the horizontal axis of the plane), and the output directions 61a, 61c, 61e, and 61g may be non-axial output directions.
For example, if the target output direction is the output direction 61b, the terminal device may determine that the target output direction is the axial output direction, further determine the first auxiliary parameter as an auxiliary parameter of the projection vector for the output direction 61b, and determine the second auxiliary parameter as an auxiliary parameter of the projection vector for the output direction 61a, the output direction 61c, the output direction 61d, the output direction 61e, the output direction 61f, the output direction 61g and the output direction 61h, respectively. For another example, if the target output direction is the output direction 61a, the terminal device may determine that the target output direction is a non-axial output direction, further determine the first auxiliary parameter as an auxiliary parameter for the projection vector for the output direction 61a, the output direction 61b and the output direction 61h, respectively, and determine the second auxiliary parameter as an auxiliary parameter for the projection vector for the output direction 61c, the output direction 61d, the output direction 61e, the output direction 61f and the output direction 61g, respectively.
The specific process of determining the candidate proportion values of the projection vectors for the S output directions according to the S direction angles by the terminal device may refer to the following description of step S10332 in the embodiment corresponding to fig. 10; the specific process of determining the direction proportion values of the projection vectors for the S output directions according to the S auxiliary parameters and the S candidate proportion values by the terminal device may be referred to as a description of step S10333 in the embodiment corresponding to fig. 10 below.
Alternatively, the specific process of determining the direction proportion values of the projection vectors for the S output directions based on the target output directions by the terminal device may be described as: the terminal device may determine auxiliary parameters of the projection vector for the S output directions, respectively, based on the target output directions. Wherein the S output directions include an output direction N i Here i may be a positive integer not greater than S. Further, if the output direction N i The corresponding auxiliary parameter is a first auxiliary parameter (e.g. the first auxiliary parameter may be equal to 1), the terminal device may target the output direction N according to the projection vector i Determining the projection vector for the output direction N i Is a ratio of the direction of the (b) to the (c) direction. In other words, if the output direction N i The corresponding auxiliary parameter is the first auxiliary parameter, and the terminal device may target the output direction N according to the projection vector i Is used for determining the projection vector needleFor the output direction N i For the projection vector to the output direction N i Is determined as the projection vector for the output direction N i Is a ratio of the direction of the (b) to the (c) direction. Alternatively, if the output direction N i The corresponding auxiliary parameter is a second auxiliary parameter (e.g., the second auxiliary parameter may be equal to 0), the terminal device may determine a second default scale value (e.g., the second default scale value may be equal to 0) as the projection vector for the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
Wherein the terminal device aims at the output direction N according to the projection vector i Determining the projection vector for the output direction N i For a specific procedure of the candidate proportion value of (c), reference may be made to the following description of the candidate proportion value of the projection vector for the S output directions, respectively, determined by the terminal device according to the direction angles of the projection vector for the S output directions, respectively.
Therefore, the embodiment of the application can carry out plane projection on the rotation quantity to obtain the projection vector of the rotation vector on the vertical plane, and further determine the target output direction corresponding to the projection vector in the S output directions according to the projection coordinates of the projection vector. Further, the terminal device may determine direction proportion values of the projection vectors for the S output directions, respectively, based on the target output directions. It can be understood that based on the target output direction corresponding to the projection vector, S direction proportion values can be accurately determined, and S direction proportion values can be used for determining S axial rotation parameters, so that the embodiment of the application can prepare for determining S axial rotation parameters, thereby improving the accuracy of axial rotation while improving the efficiency of axial rotation.
Further, referring to fig. 10, fig. 10 is a flowchart illustrating a data processing method according to an embodiment of the present application. The data processing method may include the following steps S10331 to S10333, and steps S10331 to S10333 are a specific embodiment of step S1033 in the embodiment corresponding to fig. 9.
Step S10331, based on the target output directions, determining auxiliary parameters of the projection vectors respectively aiming at the S output directions;
the S output directions comprise an axial output direction and a non-axial output direction; s output directions including output direction N i Here i may be a positive integer not greater than S.
Step S10332, determining candidate proportion values of the projection vectors respectively aiming at the S output directions according to the direction angles of the projection vectors respectively aiming at the S output directions;
specifically, if the output direction N i For axial output direction, the terminal device can aim the projection vector at output direction N i Direction angle (i.e. projection vector and output direction N) i Included angle between them) and a first angle threshold to obtain a first comparison result, and generating a projection vector for the output direction N based on the first comparison result i Is a candidate ratio value of (2). Alternatively, if the output direction N i For a non-axial output direction, the projection vector is directed to the output direction N i Direction angle (i.e. projection vector and output direction N) i Included angle) and a second angle threshold value to obtain a second comparison result, and generating a projection vector for the output direction N based on the second comparison result i Is a candidate ratio value of (2). Wherein the second angle threshold is less than the first angle threshold, e.g., the first angle threshold may be equal to 90 degrees and the second angle threshold may be equal to 45 degrees.
Wherein the terminal device can aim the projection vector at the output direction N i Is compared to a first angle threshold. Further, if the projection vector is directed to the output direction N i If the direction angle of (2) is greater than the first angle threshold, generating a signal indicating that the projection vector is directed to the output direction N i A first comparison result of the direction angle of (a) being greater than a first angle threshold; alternatively, if the projection vector is directed to the output direction N i Is less than or equal to the first angle threshold, then a direction angle is generated for indicating that the projection vector is directed to the output direction N i The direction angle of (c) is less than or equal to the first angle threshold.
Wherein the terminal device generates a projection vector for the output direction N based on the first comparison result i Candidate ratio of (2)The specific process of the example values can be described as: if the first comparison result indicates that the projection vector is directed to the output direction N i The terminal device may determine the first default ratio value as the projection vector for the output direction N i Is a candidate ratio value of (2). Optionally, if the first comparison result indicates that the projection vector is directed to the output direction N i The terminal device may determine that the projection vector is directed to the output direction N if the direction angle of (a) is less than or equal to the first angle threshold i An angle difference (i.e., a first angle difference) between the direction angle of (a) and the first angle threshold, and determining a ratio between the angle difference (i.e., the first angle difference) and the first angle threshold as the projection vector for the output direction N i Is a candidate ratio value of (2).
Wherein the terminal device can aim the projection vector at the output direction N i Is compared to a second angle threshold. Further, if the projection vector is directed to the output direction N i If the direction angle of (2) is greater than the second angle threshold, generating a signal indicating that the projection vector is directed to the output direction N i A second comparison result of the direction angle greater than a second angle threshold; alternatively, if the projection vector is directed to the output direction N i If the direction angle of (2) is less than or equal to the second angle threshold, generating a signal indicating that the projection vector is directed to the output direction N i A second comparison result of the direction angle of less than or equal to a second angle threshold.
Wherein the terminal device generates a projection vector for the output direction N based on the second comparison result i The specific procedure for candidate ratio values of (2) can be described as: if the second comparison result indicates that the projection vector is directed to the output direction N i The terminal device may determine the first default ratio value as the projection vector for the output direction N i Is a candidate ratio value of (2). Optionally, if the second comparison result indicates that the projection vector is directed to the output direction N i The terminal device may determine that the projection vector is directed to the output direction N if the direction angle of (a) is less than or equal to the second angle threshold i Angle difference between the direction angle of (a) and the second angle threshold (i.e., second angle difference), willThe ratio between the angle difference (i.e. the second angle difference) and the second angle threshold is determined as the projection vector for the output direction N i Is a candidate ratio value of (2).
It should be appreciated that since the terminal device needs to determine the direction scale values of the projection vectors for the S output directions respectively according to the S auxiliary parameters and the S candidate scale values after determining the candidate scale values of the projection vectors for the S output directions respectively, the direction scale values of the projection vectors for the S output directions respectively are determined in the projection vectors for the output direction N i When the direction angle of (a) is greater than the first angle threshold (or the second angle threshold), the projection vector is directed to the output direction N i The second auxiliary parameter may be equal to 0, so the first default scale value may be equal to any value (e.g., the first default scale value may be equal to 0).
Optionally, if the terminal device needs to determine candidate proportion values of the projection vector for the S output directions as direction proportion values of the projection vector for the S output directions respectively, the first default proportion value may be equal to 0; in other words, if the terminal device needs to determine candidate proportion values of the projection vector for the S output directions respectively as direction proportion values of the projection vector for the S output directions respectively, and the projection vector for the output direction N i If the direction angle of (a) is greater than the first angle threshold (or the second angle threshold), the terminal device may determine a second default scale value (e.g., the second default scale value may be equal to 0) as the projection vector for the output direction N i Is a ratio of the direction of the (b) to the (c) direction. At this time, if the projection vector is directed to the output direction N i The direction angle of (a) is greater than the first angle threshold (or the second angle threshold), then the projection vector is for the output direction N i Is a second auxiliary parameter.
For ease of understanding, please refer to fig. 6 again, the angle between the projection vector 60d and the output direction 61d is equal to 30 degrees, the angle between the projection vector 60d and the output direction 61c is equal to 15 degrees, and the angle between the projection vector 60d and the output direction 61b is equal to 60 degrees.
As shown in fig. 6, the output direction 61d is an axial output direction, the angle between the projection vector 60d and the output direction 61d is smaller than (i.e. 30 degrees) or equal to the first angle threshold (i.e. 90 degrees), the angle difference between the angle between the projection vector 60d and the output direction 61d and the first angle threshold is equal to 60 degrees, and the terminal device may determine the ratio (i.e. 60/90=2/3) between the angle difference (i.e. 60 degrees) and the first angle threshold as the candidate ratio of the projection vector 60d for the output direction 61 d. Similarly, the output direction 61c is a non-axial output direction, the angle (i.e. 15 degrees) between the projection vector 60d and the output direction 61c is smaller than or equal to the second angle threshold (i.e. 45 degrees), the angle difference between the angle between the projection vector 60d and the output direction 61c and the second angle threshold is equal to 30 degrees, and the terminal device may determine the ratio (i.e. 30/45=2/3) between the angle difference (i.e. 30 degrees) and the second angle threshold as the candidate ratio of the projection vector 60d for the output direction 61 c. Similarly, the output direction 61b is an axial output direction, the included angle (i.e. 60 degrees) between the projection vector 60d and the output direction 61b is smaller than or equal to the first angle threshold (i.e. 90 degrees), the difference between the included angle between the projection vector 60d and the output direction 61b and the first angle threshold is equal to 30 degrees, and the terminal device may determine the ratio (i.e. 30/90=1/3) between the difference (i.e. 30 degrees) and the first angle threshold as the candidate ratio of the projection vector 60d for the output direction 61 b.
As shown in fig. 6, the output direction 61e is a non-axial output direction, the angle (i.e. 75 degrees) between the projection vector 60d and the output direction 61e is greater than the second angle threshold (i.e. 45 degrees), and the terminal device may determine the first default scale value as the candidate scale value of the projection vector 60d for the output direction 61 e. Similarly, the output direction 61f is an axial output direction, the angle (i.e. 120 degrees) between the projection vector 60d and the output direction 61f is greater than the first angle threshold (i.e. 90 degrees), and the terminal device may determine the first default scale value as a candidate scale value of the projection vector 60d for the output direction 61 f. Similarly, the output direction 61g is a non-axial output direction, the angle (i.e. 165 degrees) between the projection vector 60d and the output direction 61g is greater than the second angle threshold (i.e. 45 degrees), and the terminal device may determine the first default ratio value as a candidate ratio value of the projection vector 60d for the output direction 61 g. Similarly, the output direction 61h is an axial output direction, the angle (i.e. 150 degrees) between the projection vector 60d and the output direction 61h is greater than the first angle threshold (i.e. 90 degrees), and the terminal device may determine the first default scale value as the candidate scale value of the projection vector 60d for the output direction 61 h. Similarly, the output direction 61a is a non-axial output direction, the angle (i.e. 105 degrees) between the projection vector 60d and the output direction 61a is greater than the second angle threshold (i.e. 45 degrees), and the terminal device may determine the first default ratio value as the candidate ratio value of the projection vector 60d for the output direction 61 a.
Wherein the S auxiliary parameters may include an output direction N i Corresponding auxiliary parameters (i.e. projection vector for output direction N i Auxiliary parameters of (2) S candidate scale values may include the output direction N i Corresponding candidate scale values (i.e. projection vector for output direction N i Candidate ratio values of (c) in the above).
Step S10333, determining direction proportion values of the projection vector for the S output directions according to the S auxiliary parameters and the S candidate proportion values.
Specifically, the terminal device may output the direction N i Corresponding auxiliary parameter and output direction N i Multiplying the corresponding candidate proportion values to generate projection vectors aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction. The S direction proportion values may be used to determine the axial rotation parameters corresponding to the S output directions respectively together with the angle proportion values.
In other words, the terminal device may determine the axial rotation parameters corresponding to the S output directions respectively according to the S auxiliary parameters, the S candidate proportion values, and the angle proportion values after determining the auxiliary parameters of the projection vectors for the S output directions respectively, determining the candidate proportion values of the projection vectors for the S output directions respectively, and determining the angle proportion values of the rotation vectors for the unit vectors. Wherein the terminal device can output the direction N i Corresponding auxiliary parameter, output direction N i Multiplying the corresponding candidate proportion value and angle proportion value to generate a projection vector aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
Therefore, the embodiment of the application can determine the auxiliary parameters of the projection vectors respectively aiming at the S output directions based on the target output directions, and further determine the candidate proportion values of the projection vectors respectively aiming at the S output directions according to the direction angles of the projection vectors respectively aiming at the S output directions. Further, the terminal device may determine, according to the S auxiliary parameters and the S candidate scale values, direction scale values of the projection vector for the S output directions, respectively. It can be understood that based on the target output direction corresponding to the projection vector and the direction angles of the projection vector for the S output directions, the S direction proportional values can be accurately determined, and the S direction proportional values can be used for determining the S axial rotation parameters, so that the embodiment of the application can prepare to determine the S axial rotation parameters, thereby improving the accuracy of the axial rotation while improving the efficiency of the axial rotation.
Further, referring to fig. 11, fig. 11 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, where the data processing apparatus 1 may include: the plane acquisition module 11, the first proportion value acquisition module 12, the second proportion value acquisition module 13 and the parameter determination module 14;
A plane acquisition module 11 for acquiring a vertical plane perpendicular to the unit vector; the vertical plane comprises S output directions; s is a positive integer; the starting point and the direction of the unit vector are the same as those of the default vector; the default vector is used for indicating the initial state of the virtual part in the virtual object;
the first proportion value obtaining module 12 is configured to obtain a rotation vector corresponding to the unit vector, and determine an angle proportion value of the rotation vector for the unit vector; the rotation vector is a vector obtained by spatially rotating the unit vector;
the first proportional value obtaining module 12 is specifically configured to spatially rotate the unit vector to obtain a spatially rotated unit vector, and determine the spatially rotated unit vector as a rotation vector corresponding to the unit vector;
the first proportional value obtaining module 12 is specifically configured to obtain a spatial rotation angle between the unit vector and the rotation vector, and determine a ratio between the spatial rotation angle and a rotation angle threshold as an angle proportional value of the rotation vector for the unit vector.
A second proportional value obtaining module 13, configured to obtain projection vectors of the rotation vectors on a vertical plane, and determine direction proportional values of the projection vectors for the S output directions respectively;
Wherein the second ratio value obtaining module 13 includes: a plane projection unit 131, a direction determination unit 132, and a scale value determination unit 133;
a plane projection unit 131, configured to perform plane projection on the rotation vector to obtain a projection vector of the rotation vector on a vertical plane;
a direction determining unit 132, configured to determine a target output direction corresponding to the projection vector from the S output directions according to the projection coordinates of the projection vector;
wherein the direction determining unit 132 includes: a coordinate determination subunit 1321, a direction determination subunit 1322;
a coordinate determination subunit 1321 configured to determine, as projection coordinates of the projection vector, coordinates of an end point of the projection vector;
a coordinate determination subunit 1321, configured to determine coordinate axis projection parameters corresponding to the projection vectors according to the projection coordinates of the projection vectors;
the coordinate determination subunit 1321 is configured to determine, according to the projection coordinates of the projection vector, a non-coordinate axis projection parameter corresponding to the projection vector;
wherein the vertical plane comprises a plane transverse axis and a plane longitudinal axis; the projection coordinates of the projection vector comprise a horizontal axis coordinate value corresponding to a horizontal axis of a plane and a vertical axis coordinate value corresponding to a vertical axis of the plane;
the coordinate determination subunit 1321 is specifically configured to determine the first projection parameter as a cross-axis projection parameter corresponding to the projection vector if the cross-axis coordinate value is equal to the coordinate threshold value, and determine the second projection parameter as a cross-axis projection parameter corresponding to the projection vector if the cross-axis coordinate value is not equal to the coordinate threshold value;
The coordinate determination subunit 1321 is specifically configured to determine the third projection parameter as a vertical axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is equal to the coordinate threshold value, and determine the fourth projection parameter as a vertical axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is not equal to the coordinate threshold value;
the coordinate determination subunit 1321 is specifically configured to add the horizontal axis projection parameter and the vertical axis projection parameter to generate a coordinate axis projection parameter corresponding to the projection vector.
Wherein the vertical plane comprises a plane transverse axis and a plane longitudinal axis; the projection coordinates of the projection vector comprise a horizontal axis coordinate value corresponding to a horizontal axis of a plane and a vertical axis coordinate value corresponding to a vertical axis of the plane;
the coordinate determination subunit 1321 is specifically configured to determine the fifth projection parameter as the first oblique projection parameter corresponding to the projection vector if the horizontal axis coordinate value is greater than or equal to the coordinate threshold, and determine the sixth projection parameter as the first oblique projection parameter corresponding to the projection vector if the horizontal axis coordinate value is less than the coordinate threshold;
the coordinate determination subunit 1321 is specifically configured to determine the seventh projection parameter as a second oblique axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is greater than or equal to the coordinate threshold, and determine the eighth projection parameter as the second oblique axis projection parameter corresponding to the projection vector if the vertical axis coordinate value is less than the coordinate threshold;
The coordinate determination subunit 1321 is specifically configured to perform an addition operation on the first oblique axis projection parameter and the second oblique axis projection parameter, and generate a non-coordinate axis projection parameter corresponding to the projection vector.
The direction determination subunit 1322 is configured to perform an addition operation on the coordinate axis projection parameter and the non-coordinate axis projection parameter, and generate an output parameter corresponding to the projection vector;
the direction determining subunit 1322 is configured to determine, according to the output parameters, a target output direction corresponding to the projection vector among the S output directions.
For a specific implementation manner of the coordinate determining subunit 1321 and the direction determining subunit 1322, reference may be made to the description of step S1032 in the embodiment corresponding to fig. 9, which will not be repeated here.
The scale value determining unit 133 is configured to determine direction scale values of the projection vectors for the S output directions, respectively, based on the target output directions.
Wherein the ratio value determining unit 133 includes: a parameter determination subunit 1331, a scale value determination subunit 1332;
a parameter determination subunit 1331, configured to determine auxiliary parameters of the projection vectors for the S output directions, respectively, based on the target output directions;
the S output directions comprise an axial output direction and a non-axial output direction;
A parameter determination subunit 1331, specifically configured to determine, if the target output direction is the axial output direction, the first auxiliary parameter as an auxiliary parameter of the projection vector for the target output direction, and determine the second auxiliary parameter as an auxiliary parameter of the projection vector for the S-1 output directions; the S-1 output directions are output directions except the target output direction in the S output directions;
a parameter determination subunit 1331, specifically configured to determine, if the target output direction is a non-axial output direction, the first auxiliary parameter as an auxiliary parameter of the projection vector for the candidate output directions, and determine the second auxiliary parameter as an auxiliary parameter of the projection vector for the S-3 output directions; the candidate output directions comprise a target output direction and two output directions adjacent to the target output direction; the S-3 output directions are output directions other than the candidate output direction among the S output directions.
A proportion value determining subunit 1332, configured to determine candidate proportion values of the projection vector for the S output directions according to the direction angles of the projection vector for the S output directions, respectively;
the scale value determining subunit 1332 is configured to determine, according to the S auxiliary parameters and the S candidate scale values, direction scale values of the projection vectors for the S output directions, respectively.
The S output directions comprise an axial output direction and a non-axial output direction; s output directions including output direction N i I is a positive integer not greater than S;
a proportion value determining subunit 1332 for determining the output direction N i For the axial output direction, the projection vector is directed to the output direction N i Is compared with a first angle thresholdObtaining a first comparison result, and generating a projection vector for the output direction N based on the first comparison result i Is a candidate ratio value of (2);
a proportion value determining subunit 1332 for determining the output direction N i For a non-axial output direction, the projection vector is directed to the output direction N i Comparing the direction angle of (2) with a second angle threshold to obtain a second comparison result, and generating a projection vector for the output direction N based on the second comparison result i Is a candidate ratio value of (2); the second angle threshold is less than the first angle threshold.
Wherein the proportion value determining subunit 1332 is specifically configured to, if the first comparison result indicates that the projection vector is directed to the output direction N i If the direction angle of the projection vector is greater than the first angle threshold, determining a first default ratio value as the projection vector for the output direction N i Is a candidate ratio value of (2);
a scale value determining subunit 1332, specifically configured to, if the first comparison result indicates that the projection vector is directed to the output direction N i If the direction angle of (2) is less than or equal to the first angle threshold, determining that the projection vector is directed to the output direction N i An angle difference between the direction angle of (a) and the first angle threshold, determining a ratio between the angle difference and the first angle threshold as the projection vector for the output direction N i Is a candidate ratio value of (2).
Wherein the S auxiliary parameters include an output direction N i Corresponding auxiliary parameters, S candidate proportion values comprise an output direction N i Corresponding candidate ratio values;
a proportion value determining subunit 1332 for determining the output direction N i Corresponding auxiliary parameter and output direction N i Multiplying the corresponding candidate proportion values to generate projection vectors aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
For specific implementation manners of the parameter determining subunit 1331 and the proportional value determining subunit 1332, reference may be made to the description of the step S1033 in the embodiment corresponding to fig. 9 and the description of the step S10331-step S10333 in the embodiment corresponding to fig. 10, which will not be repeated here.
Wherein the ratio value is determinedA determining unit 133, specifically configured to determine auxiliary parameters of the projection vector for S output directions respectively based on the target output directions; s output directions including output direction N i I is a positive integer not greater than S;
the proportional value determining unit 133 is specifically configured to determine if the output direction N is i The corresponding auxiliary parameter is the first auxiliary parameter, and the output direction N is aimed according to the projection vector i Determining the projection vector for the output direction N i Direction ratio value of (2);
the proportional value determining unit 133 is specifically configured to determine if the output direction N is i The corresponding auxiliary parameter is a second auxiliary parameter, and then a second default proportion value is determined as the projection vector aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
For specific implementation manners of the plane projection unit 131, the direction determination unit 132 and the scale value determination unit 133, reference may be made to the descriptions of the steps S1031-S1033 in the embodiment corresponding to fig. 9 and the steps S10331-S10333 in the embodiment corresponding to fig. 10, which will not be repeated here.
The parameter determining module 14 is configured to determine axial rotation parameters corresponding to the S output directions according to the angle proportion value and the S direction proportion values; the S axial rotation parameters are used for driving the default vector to axially rotate to the position indicated by the rotation vector; the default vector after driving is used for indicating the virtual part to be updated from the initial state to the target state.
Wherein the S output directions include an output direction N i I is a positive integer not greater than S; s direction proportional values include the output direction N i A corresponding direction proportional value;
parameter determination module 14, in particular for the angular scale value and the output direction N i Multiplying the corresponding direction proportion value to generate an output direction N i Corresponding axial rotation parameters.
For specific implementation manners of the plane obtaining module 11, the first scale value obtaining module 12, the second scale value obtaining module 13 and the parameter determining module 14, reference may be made to the embodiments corresponding to the above-mentioned fig. 3 for the descriptions of the steps S101 to S104, the embodiments corresponding to the steps S1031 to S1033 and the embodiments corresponding to the fig. 9 for the steps S10331 to S10333, and the descriptions will not be repeated here. In addition, the description of the beneficial effects of the same method is omitted.
Further, referring to fig. 12, fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application, where the computer device may be a terminal device or a server. As shown in fig. 12, the computer device 1000 may include: processor 1001, network interface 1004, and memory 1005, and in addition, the above-described computer device 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. In some embodiments, the user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. Alternatively, the network interface 1004 may include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory 1005 may also be at least one memory device located remotely from the aforementioned processor 1001. As shown in fig. 12, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 1005, which is one type of computer-readable storage medium.
In the computer device 1000 shown in FIG. 12, the network interface 1004 may provide network communication functions; while user interface 1003 is primarily used as an interface for providing input to a user; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
obtaining a vertical plane perpendicular to the unit vector; the vertical plane comprises S output directions; s is a positive integer; the starting point and the direction of the unit vector are the same as those of the default vector; the default vector is used for indicating the initial state of the virtual part in the virtual object;
acquiring a rotation vector corresponding to the unit vector, and determining an angle proportion value of the rotation vector to the unit vector; the rotation vector is a vector obtained by spatially rotating the unit vector;
obtaining projection vectors of the rotation vectors on a vertical plane, and determining direction proportion values of the projection vectors respectively aiming at S output directions;
according to the angle proportion value and the S direction proportion values, determining axial rotation parameters corresponding to S output directions respectively; the S axial rotation parameters are used for driving the default vector to axially rotate to the position indicated by the rotation vector; the default vector after driving is used for indicating the virtual part to be updated from the initial state to the target state.
It should be understood that the computer device 1000 described in the embodiment of the present application may perform the description of the data processing method in the embodiment corresponding to fig. 3, 9 and 10, and may also perform the description of the data processing apparatus 1 in the embodiment corresponding to fig. 11, which are not described herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, in which the computer program executed by the aforementioned data processing apparatus 1 is stored, and when the processor executes the computer program, the description of the data processing method in the embodiment corresponding to fig. 3, 9 and 10 can be executed, and therefore, the description will not be repeated here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
In addition, it should be noted that: embodiments of the present application also provide a computer program product, which may include a computer program, which may be stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer readable storage medium, and the processor may execute the computer program, so that the computer device performs the description of the data processing method in the embodiments corresponding to fig. 3, 9 and 10, and thus, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer program product according to the present application, reference is made to the description of the method embodiments of the present application.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (16)

1. A method of data processing, comprising:
obtaining a vertical plane perpendicular to the unit vector; the vertical plane comprises S output directions; s is a positive integer; the starting point and the direction of the unit vector are the same as those of the default vector; the default vector is used for indicating the initial state of a virtual part in the virtual object;
acquiring a rotation vector corresponding to the unit vector, and determining an angle proportion value of the rotation vector to the unit vector; the rotation vector is a vector obtained by spatially rotating the unit vector;
Obtaining projection vectors of the rotation vectors on the vertical plane, and determining direction proportion values of the projection vectors respectively aiming at S output directions;
according to the angle proportion value and the S direction proportion values, determining S axial rotation parameters corresponding to the output directions respectively; s axial rotation parameters are used for driving the default vector to axially rotate to a position indicated by the rotation vector; the default vector after driving is used for indicating the virtual part to be updated from the initial state to the target state.
2. The method of claim 1, wherein the obtaining the rotation vector corresponding to the unit vector, and determining the angular scale value of the rotation vector for the unit vector, comprises:
spatially rotating the unit vector to obtain a spatially rotated unit vector, and determining the spatially rotated unit vector as a rotation vector corresponding to the unit vector;
and acquiring a spatial rotation angle between the unit vector and the rotation vector, and determining the ratio between the spatial rotation angle and a rotation angle threshold as an angle proportion value of the rotation vector to the unit vector.
3. The method according to claim 1, wherein the obtaining a projection vector of a rotation vector onto the vertical plane, determining direction scale values of the projection vector for the S output directions, respectively, comprises:
performing plane projection on the rotation vector to obtain a projection vector of the rotation vector on the vertical plane;
determining a target output direction corresponding to the projection vector in S output directions according to the projection coordinates of the projection vector;
and determining direction proportion values of the projection vectors for the S output directions respectively based on the target output directions.
4. A method according to claim 3, wherein determining the target output direction corresponding to the projection vector from the S output directions according to the projection coordinates of the projection vector comprises:
determining the coordinates of the end point of the projection vector as the projection coordinates of the projection vector;
determining coordinate axis projection parameters corresponding to the projection vectors according to the projection coordinates of the projection vectors;
according to the projection coordinates of the projection vector, determining non-coordinate axis projection parameters corresponding to the projection vector;
Performing addition operation on the coordinate axis projection parameters and the non-coordinate axis projection parameters to generate output parameters corresponding to the projection vectors;
and determining a target output direction corresponding to the projection vector in S output directions according to the output parameters.
5. The method of claim 4, wherein the vertical plane comprises a planar transverse axis and a planar longitudinal axis; the projection coordinates of the projection vector comprise a horizontal axis coordinate value corresponding to the horizontal axis of the plane and a vertical axis coordinate value corresponding to the vertical axis of the plane;
the determining the coordinate axis projection parameters corresponding to the projection vector according to the projection coordinates of the projection vector comprises:
if the horizontal axis coordinate value is equal to a coordinate threshold, determining a first projection parameter as a horizontal axis projection parameter corresponding to the projection vector, and if the horizontal axis coordinate value is not equal to the coordinate threshold, determining a second projection parameter as the horizontal axis projection parameter corresponding to the projection vector;
if the vertical axis coordinate value is equal to the coordinate threshold, determining a third projection parameter as a vertical axis projection parameter corresponding to the projection vector, and if the vertical axis coordinate value is not equal to the coordinate threshold, determining a fourth projection parameter as the vertical axis projection parameter corresponding to the projection vector;
And carrying out addition operation on the horizontal axis projection parameters and the vertical axis projection parameters to generate coordinate axis projection parameters corresponding to the projection vectors.
6. The method of claim 4, wherein the vertical plane comprises a planar transverse axis and a planar longitudinal axis; the projection coordinates of the projection vector comprise a horizontal axis coordinate value corresponding to the horizontal axis of the plane and a vertical axis coordinate value corresponding to the vertical axis of the plane;
the determining the non-coordinate axis projection parameters corresponding to the projection vector according to the projection coordinates of the projection vector comprises:
if the coordinate value of the horizontal axis is larger than or equal to a coordinate threshold, determining a fifth projection parameter as a first oblique axis projection parameter corresponding to the projection vector, and if the coordinate value of the horizontal axis is smaller than the coordinate threshold, determining a sixth projection parameter as the first oblique axis projection parameter corresponding to the projection vector;
if the vertical axis coordinate value is greater than or equal to the coordinate threshold, determining a seventh projection parameter as a second oblique axis projection parameter corresponding to the projection vector, and if the vertical axis coordinate value is less than the coordinate threshold, determining an eighth projection parameter as the second oblique axis projection parameter corresponding to the projection vector;
And carrying out addition operation on the first oblique axis projection parameter and the second oblique axis projection parameter to generate a non-coordinate axis projection parameter corresponding to the projection vector.
7. A method according to claim 3, wherein said determining direction scaling values of said projection vectors for S said output directions, respectively, based on said target output directions, comprises:
determining auxiliary parameters of the projection vector for S output directions respectively based on the target output directions;
according to the direction angles of the projection vectors respectively aiming at the S output directions, candidate proportion values of the projection vectors respectively aiming at the S output directions are determined;
and determining the direction proportion values of the projection vector for the S output directions respectively according to the S auxiliary parameters and the S candidate proportion values.
8. The method of claim 7, wherein S output directions include an axial output direction and a non-axial output direction;
the determining auxiliary parameters of the projection vector for the S output directions based on the target output directions comprises:
if the target output direction is the axial output direction, determining a first auxiliary parameter as an auxiliary parameter of the projection vector aiming at the target output direction, and determining a second auxiliary parameter as an auxiliary parameter of the projection vector aiming at S-1 output directions; s-1 output directions are output directions except the target output direction in S output directions;
If the target output direction is the non-axial output direction, determining the first auxiliary parameter as an auxiliary parameter of the projection vector for candidate output directions, and determining the second auxiliary parameter as an auxiliary parameter of the projection vector for S-3 output directions; the candidate output directions include the target output direction and two output directions adjacent to the target output direction; s-3 of the output directions are output directions other than the candidate output directions among the S output directions.
9. The method of claim 7, wherein S output directions include an axial output direction and a non-axial output direction; s of the output directions include an output direction N i The i is a positive integer not greater than the S;
the determining candidate proportion values of the projection vector for the S output directions according to the direction angles of the projection vector for the S output directions respectively includes:
if the output direction N i For the axial output direction, the projection vector is directed to the output direction N i Comparing the direction angle of the projection vector with a first angle threshold to obtain a first comparison result, and generating the projection vector for the output direction N based on the first comparison result i Is a candidate ratio value of (2);
if the output direction N i For a non-axial output direction, directing the projection vector to the output direction N i Comparing the direction angle of the projection vector with a second angle threshold to obtain a second comparison result, and generating the projection vector for the output direction N based on the second comparison result i Is a candidate ratio value of (2); the second angle threshold is less than the first angle threshold.
10. The method of claim 9, wherein the generating the projection vector for the output direction N based on the first comparison result i Comprises:
if the first comparison result indicates that the projection vector is directed to the output direction N i If the direction angle of the projection vector is larger than the first angle threshold, determining a first default proportion value as the projection vector is specific to the output direction N i Is a candidate ratio value of (2);
if the first comparison result indicates that the projection vector is directed to the output direction N i If the direction angle of the projection vector is less than or equal to the first angle threshold, determining that the projection vector is directed to the output direction N i An angle difference between the angle difference and the first angle threshold, determining a ratio between the angle difference and the first angle threshold as the projection vector for the output direction N i Is a candidate ratio value of (2).
11. The method of claim 9, wherein S of the auxiliary parameters include the output direction N i Corresponding auxiliary parameters, S of the candidate proportion values comprise the output direction N i Corresponding candidate ratio values;
the determining, according to the S auxiliary parameters and the S candidate proportion values, direction proportion values of the projection vectors for the S output directions respectively includes:
for the output direction N i Corresponding auxiliary parameters and the output direction N i Multiplying the corresponding candidate proportion values to generate the projection vector aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
12. A method according to claim 3, wherein said determining direction scaling values of said projection vectors for S said output directions, respectively, based on said target output directions, comprises:
determining auxiliary parameters of the projection vector for S output directions respectively based on the target output directions; s of the output directions include an output direction N i The i is a positive integer not greater than the S;
if the output direction N i The corresponding auxiliary parameter is a first auxiliary parameter, and the output direction N is aimed according to the projection vector i Determining the direction angle of the projection vector with respect to the output direction N i Direction ratio value of (2);
if the output direction N i The corresponding auxiliary parameter is a second auxiliary parameter, and a second default proportion value is determined as the projection vector aiming at the output direction N i Is a ratio of the direction of the (b) to the (c) direction.
13. The method of claim 1, wherein S of the output directions include an output direction N i The i is a positive integer not greater than the S; s of the direction proportion values include the output direction N i A corresponding direction proportional value;
the determining the axial rotation parameters corresponding to the S output directions respectively according to the angle ratio value and the S direction ratio values includes:
for the angle proportion value and the output direction N i Multiplying the corresponding direction proportion value to generate the output direction N i Corresponding axial rotation parameters.
14. A data processing apparatus, comprising:
the plane acquisition module is used for acquiring a vertical plane vertical to the unit vector; the vertical plane comprises S output directions; s is a positive integer; the starting point and the direction of the unit vector are the same as those of the default vector; the default vector is used for indicating the initial state of a virtual part in the virtual object;
The first proportion value acquisition module is used for acquiring a rotation vector corresponding to the unit vector and determining an angle proportion value of the rotation vector for the unit vector; the rotation vector is a vector obtained by spatially rotating the unit vector;
the second proportion value acquisition module is used for acquiring projection vectors of the rotation vectors on the vertical plane and determining direction proportion values of the projection vectors for the S output directions respectively;
the parameter determining module is used for determining axial rotation parameters corresponding to the S output directions respectively according to the angle proportion value and the S direction proportion values; s axial rotation parameters are used for driving the default vector to axially rotate to a position indicated by the rotation vector; the default vector after driving is used for indicating the virtual part to be updated from the initial state to the target state.
15. A computer device, comprising: a processor and a memory;
the processor is connected to the memory, wherein the memory is configured to store a computer program, and the processor is configured to invoke the computer program to cause the computer device to perform the method of any of claims 1-13.
16. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any of claims 1-13.
CN202311063146.6A 2023-08-23 2023-08-23 Data processing method, device, computer equipment and readable storage medium Active CN116797769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311063146.6A CN116797769B (en) 2023-08-23 2023-08-23 Data processing method, device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311063146.6A CN116797769B (en) 2023-08-23 2023-08-23 Data processing method, device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN116797769A true CN116797769A (en) 2023-09-22
CN116797769B CN116797769B (en) 2023-11-21

Family

ID=88050073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311063146.6A Active CN116797769B (en) 2023-08-23 2023-08-23 Data processing method, device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116797769B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009070340A (en) * 2007-09-18 2009-04-02 Namco Bandai Games Inc Skeleton operation control system, program, and information storage medium
CN110458943A (en) * 2019-07-31 2019-11-15 深圳市商汤科技有限公司 Mobile object spinning solution and device, control equipment and storage medium
CN112686976A (en) * 2020-12-31 2021-04-20 咪咕文化科技有限公司 Processing method and device of skeleton animation data and communication equipment
CN112973118A (en) * 2021-04-15 2021-06-18 腾讯科技(深圳)有限公司 Skeleton animation display method, device, equipment and storage medium
CN113870119A (en) * 2021-10-14 2021-12-31 吉旗(成都)科技有限公司 Point cloud data correction method and device, electronic equipment and storage medium
CN116342846A (en) * 2023-02-22 2023-06-27 网易(杭州)网络有限公司 Processing method and device of virtual object model, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009070340A (en) * 2007-09-18 2009-04-02 Namco Bandai Games Inc Skeleton operation control system, program, and information storage medium
CN110458943A (en) * 2019-07-31 2019-11-15 深圳市商汤科技有限公司 Mobile object spinning solution and device, control equipment and storage medium
CN112686976A (en) * 2020-12-31 2021-04-20 咪咕文化科技有限公司 Processing method and device of skeleton animation data and communication equipment
CN112973118A (en) * 2021-04-15 2021-06-18 腾讯科技(深圳)有限公司 Skeleton animation display method, device, equipment and storage medium
CN113870119A (en) * 2021-10-14 2021-12-31 吉旗(成都)科技有限公司 Point cloud data correction method and device, electronic equipment and storage medium
CN116342846A (en) * 2023-02-22 2023-06-27 网易(杭州)网络有限公司 Processing method and device of virtual object model, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘海朗;石磊;朱敏;戴跃伟;: "采用图像轮廓的弹性连接体三维建模与运动估计", 南京理工大学学报(自然科学版), no. 02, pages 78 - 82 *

Also Published As

Publication number Publication date
CN116797769B (en) 2023-11-21

Similar Documents

Publication Publication Date Title
EP2745894A2 (en) Cloud-based game slice generation and frictionless social sharing with instant play
US20190065028A1 (en) Agent-based platform for the development of multi-user virtual reality environments
JP7258066B2 (en) POSITIONING METHOD, POSITIONING DEVICE, AND ELECTRONIC DEVICE
KR20110002093A (en) Panning using virtual surfaces
CN102067179A (en) Swoop navigation
KR20210036317A (en) Mobile edge computing based visual positioning method and device
US20230249076A1 (en) Collision data processing method and apparatus, storage medium, program product, and electronic device
JP7228623B2 (en) Obstacle detection method, device, equipment, storage medium, and program
KR102550986B1 (en) Transitioning from public to personal digital reality experience
CN114627268A (en) Visual map updating method and device, electronic equipment and medium
CN112827169B (en) Game image processing method and device, storage medium and electronic equipment
WO2024088144A1 (en) Augmented reality picture processing method and apparatus, and electronic device and storage medium
CN112068703B (en) Target object control method and device, electronic device and storage medium
CN116797769B (en) Data processing method, device, computer equipment and readable storage medium
CN111949816B (en) Positioning processing method, device, electronic equipment and storage medium
CN111897437A (en) Cross-terminal interaction method and device, electronic equipment and storage medium
CN111729312A (en) Position synchronization method, device and equipment
CN114416270A (en) Page display method, device, equipment and medium
CN108536830A (en) Picture dynamic searching method, device, equipment, server and storage medium
US10019834B2 (en) Real-time rendering of volumetric models with occlusive and emissive particles
US20170164153A1 (en) Distance display method based on social networking application, terminal, and server
CN113469877B (en) Object display method, scene display method, device and computer readable medium
US20240143126A1 (en) Display method, apparatus, and electronic device
CN114095719B (en) Image display method, image display device and storage medium
KR101352090B1 (en) Game image displaying method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant