CN108470058B - Three-dimensional target query method, device, equipment and computer readable storage medium - Google Patents

Three-dimensional target query method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN108470058B
CN108470058B CN201810240491.5A CN201810240491A CN108470058B CN 108470058 B CN108470058 B CN 108470058B CN 201810240491 A CN201810240491 A CN 201810240491A CN 108470058 B CN108470058 B CN 108470058B
Authority
CN
China
Prior art keywords
inquired
target
target area
queried
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810240491.5A
Other languages
Chinese (zh)
Other versions
CN108470058A (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.)
Zhejiang Kelan Information Technology Co ltd
Original Assignee
Zhejiang Kelan Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Kelan Information Technology Co ltd filed Critical Zhejiang Kelan Information Technology Co ltd
Priority to CN201810240491.5A priority Critical patent/CN108470058B/en
Publication of CN108470058A publication Critical patent/CN108470058A/en
Application granted granted Critical
Publication of CN108470058B publication Critical patent/CN108470058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery

Abstract

The embodiment of the invention discloses a method, a device and equipment for querying a three-dimensional target and a computer readable storage medium. The method comprises the steps of obtaining a target point to be inquired and a target area to be inquired in a three-dimensional space scene; calling back a target point to be queried, and acquiring a vertex coordinate of a target area to be queried; in the process of inquiring a target point to be inquired in a target area to be inquired, determining the position of the target point to be inquired in the target area to be inquired by judging the position relation between the target point to be inquired and the target area to be inquired by using the vertex coordinates returned by callback; and in a three-dimensional space scene, displaying and inquiring by using a model loading mode to obtain the three-dimensional position of the target point to be inquired. According to the technical scheme, the position of the target point to be inquired in the target area to be inquired is determined in the three-dimensional space scene, the position information of the target to be inquired is obtained and is the three-dimensional space position, accurate inquiry of the target point is achieved, and the space position of the target can be accurately positioned in the three-dimensional space scene.

Description

Three-dimensional target query method, device, equipment and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of three-dimensional space retrieval, in particular to a method, a device and equipment for querying a three-dimensional target and a computer-readable storage medium.
Background
With the rapid development of cities, the traditional city management mode cannot meet the requirements of city development and the requirements of people on high-quality life due to the problems of abstraction, specialty, slow information flow and the like.
Under the motivation action of the rapid development of the internet technology, the development process of the running mode for promoting the real-time performance and the intuition of the city management is accelerated, and the acceleration of transformation and upgrading of the city management is particularly important. In the prior art, a searched target object can only be displayed on a two-dimensional plane, but the current tall buildings in each big city stand up, only the two-dimensional plane position of the target is determined, the three-dimensional space position of the target object cannot be determined, accurate target query cannot be realized, a user cannot obtain accurate positioning information, and the user needs to further query.
In view of this, how to implement accurate query of a target and accurately display a spatial position of the target is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device and equipment for querying a three-dimensional target and a computer readable storage medium, which realize accurate query of the target and can accurately position the spatial position of the target in a three-dimensional space scene.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
the embodiment of the invention provides a three-dimensional target query method on the one hand, and a method for drawing a graph based on a three-dimensional map engine, which comprises the following steps:
acquiring a target point to be inquired and a target area to be inquired in a three-dimensional space scene;
calling back the target point to be queried to obtain the vertex coordinates of the target area to be queried;
in the process of inquiring the target point to be inquired in the target area to be inquired, determining the position of the target point to be inquired in the target area to be inquired by judging the position relation between the target point to be inquired and the target area to be inquired by using the vertex coordinates returned by callback;
and in the three-dimensional space scene, displaying and querying by using a model loading mode to obtain the three-dimensional position of the target point to be queried.
Optionally, the determining the position relationship between the target point to be queried and the target area to be queried includes:
generating a straight line parallel to the X axis by taking the target point to be inquired as a starting point and the infinity point as an end point;
circularly taking each edge of the target area to be inquired, and executing the following judgment process;
when the current edge of the target area to be inquired is not parallel to the straight line, judging whether the target point to be inquired is on the current edge; if so, returning the result of the target point to be inquired on the side of the target area to be inquired; if not, judging whether the straight line and the current edge are intersected; if yes, counting the intersection points; if not, taking the other edge of the target area to be inquired, which is not the current edge;
counting the total number of intersection points when each edge of the target area to be inquired is circularly taken;
if the total number of the intersection points is an odd number, returning the result of the target point to be inquired in the target area to be inquired;
and if the total number of the intersection points is an even number, returning a result that the target point to be inquired is not in the target area to be inquired.
Optionally, the target area to be queried is circular or rectangular in shape.
Optionally, the method further includes:
and converting the three-dimensional position information into corresponding character position information, and sending the corresponding character position information to a user side.
Optionally, the acquiring a target point to be queried and a target area to be queried in the three-dimensional space scene includes:
receiving a query resource type and a query target area range selected by a user;
generating a target point to be queried according to the query resource type selected by the user; and generating a target area to be queried according to the query target area range.
Another aspect of the embodiments of the present invention provides a device for querying a three-dimensional target, including:
the information acquisition module is used for acquiring a target point to be inquired and a target area to be inquired in a three-dimensional space scene;
the vertex coordinate acquisition module is used for calling back the target point to be queried and acquiring the vertex coordinates of the target area to be queried;
the query module is used for judging the position relation between the target point to be queried and the target area to be queried by utilizing a ray method through the vertex coordinates returned by callback in the process of querying the target point to be queried in the target area to be queried, and determining the position of the target point to be queried in the target area to be queried;
and the display module is used for displaying and inquiring the three-dimensional position of the target point to be inquired in the three-dimensional space scene by using a model loading mode.
Optionally, the query module includes:
the straight line generation submodule is used for generating a straight line parallel to the X axis by taking the target point to be inquired as a starting point and taking the infinity as an end point;
the cyclic judgment sub-module is used for cyclically taking each edge of the target area to be inquired and executing the following judgment process; when the current edge of the target area to be inquired is not parallel to the straight line, judging whether the target point to be inquired is on the current edge; if so, returning the result of the target point to be inquired on the side of the target area to be inquired; if not, judging whether the straight line and the current edge are intersected; if yes, counting the intersection points; if not, taking the other edge of the target area to be inquired, which is not the current edge;
the intersection point total counting submodule is used for counting the total number of intersection points when each edge of the target area to be inquired is circularly taken;
the result feedback submodule is used for returning the result of the target point to be inquired in the target area to be inquired if the total number of the intersection points is an odd number; and if the total number of the intersection points is an even number, returning a result that the target point to be inquired is not in the target area to be inquired.
Optionally, after the three-dimensional position of the target point to be queried is obtained by displaying and querying in the model loading manner, the method further includes:
and the sending module is used for converting the three-dimensional position information into corresponding character position information and sending the corresponding character position information to the user side.
The embodiment of the present invention further provides a device for querying a three-dimensional target, including a processor, where the processor is configured to implement the steps of the method for querying a three-dimensional target according to any one of the foregoing items when executing a computer program stored in a memory.
Finally, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for querying a three-dimensional object according to any one of the foregoing items.
The embodiment of the invention provides a three-dimensional target query method, which comprises the steps of obtaining a target point to be queried and a target area to be queried in a three-dimensional space scene; calling back a target point to be queried, and acquiring a vertex coordinate of a target area to be queried; in the process of inquiring a target point to be inquired in a target area to be inquired, determining the position of the target point to be inquired in the target area to be inquired by judging the position relation between the target point to be inquired and the target area to be inquired by using the vertex coordinates returned by callback; and in a three-dimensional space scene, displaying and inquiring by using a model loading mode to obtain the three-dimensional position of the target point to be inquired.
The technical scheme provided by the application has the advantages that the method for drawing the graph based on the three-dimensional map engine obtains key points of the drawn graph information, calls the related rear-end interface through the callback of the key point event after the callback is drawn, displays the query result set through the corresponding model loading method, realizes the determination of the position of the target point to be queried in the target area to be queried in the three-dimensional space scene, obtains the position information of the target point to be queried as the three-dimensional space position, namely, the position information comprises two-dimensional plane information and depth information, realizes the accurate query of the target point, and can accurately position the space position of the query target in the three-dimensional space scene.
In addition, the embodiment of the invention also provides a corresponding implementation device, equipment and a computer readable storage medium for the query method of the three-dimensional target, so that the method has higher practicability and the device has corresponding advantages.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for querying a three-dimensional target according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a process of determining a position relationship between a target point to be queried and a target area to be queried according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another three-dimensional target query method according to an embodiment of the present invention;
fig. 4 is a structural diagram of an embodiment of an apparatus for querying a three-dimensional object according to an embodiment of the present invention;
fig. 5 is a block diagram of another specific embodiment of an apparatus for querying a three-dimensional object according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
Having described the technical solutions of the embodiments of the present invention, various non-limiting embodiments of the present application are described in detail below.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for querying a three-dimensional object according to an embodiment of the present invention, and a method for drawing a graph based on a three-dimensional map engine, where the embodiment of the present invention may include the following:
s101: and acquiring a target point to be inquired and a target area to be inquired in the three-dimensional space scene.
The three-dimensional space scene can be a three-dimensional map, and the query resource type and the query target area range selected by a user in the three-dimensional space scene can be received firstly; generating a target point to be queried according to the query resource type selected by the user; and generating a target area to be queried according to the query target area range.
The resource types are categories of various types of models included in the three-dimensional spatial scene, such as signal towers, restaurants, scenic spots, and the like. The query target area range is an area for searching the resource type, for example, a restaurant is searched in a first area, the first area is a target area to be queried, and the restaurant is a target point to be queried.
When the target area to be queried is selected in the three-dimensional space scene, the target area may be a circle, a rectangle, or any other shape, which is not limited in this application.
S102: and calling back the target point to be queried and acquiring the vertex coordinates of the target area to be queried.
After the target area to be queried is drawn in the three-dimensional space scene, the vertex coordinates of the target area to be queried are returned after a callback event (a target point to be queried is recalled).
S103: and in the process of inquiring the target point to be inquired in the target area to be inquired, determining the position of the target point to be inquired in the target area to be inquired by judging the position relation between the target point to be inquired and the target area to be inquired by utilizing the vertex coordinates returned by the callback.
The relationship between the back-end query point (target point to be queried) and the surface (target area to be queried) is determined by recalling the returned vertex coordinates, and the specific determination process can be shown in fig. 2 and specifically includes:
generating a straight line parallel to the X axis by taking a target point to be inquired as a starting point and taking infinity as an end point;
circularly taking each edge of the target area to be inquired, and executing the following judgment process:
when the current side of the target area to be inquired is not parallel to the straight line (when judging whether the current side of the target area to be inquired is parallel to the straight line), judging whether the target point to be inquired is on the current side; if yes, returning the result of the target point to be inquired on the target area to be inquired; if not, judging whether the straight line and the current edge are intersected; if yes, counting the intersection points; if not, taking the other edge of the target area to be inquired, which is not the current edge;
when each edge of the target area to be inquired is circularly taken, counting the total number of the intersection points;
judging whether the total number of the intersection points is an odd number or an even number;
if the total number of the intersection points is an odd number, returning the result of the target point to be inquired in the target area to be inquired;
if the total number of the intersection points is an even number, returning a result that the target point to be inquired is not in the target area to be inquired.
S104: and in a three-dimensional space scene, displaying and inquiring by using a model loading mode to obtain the three-dimensional position of the target point to be inquired.
The number of target points to be queried in the target area to be queried may be 0, 1, or more.
And when the target point to be inquired does not exist in the target area to be inquired, directly displaying that the target point does not exist.
And when a plurality of target points to be inquired exist in the target area to be inquired, displaying the obtained three-dimensional position of each target point to be inquired.
In the technical scheme provided by the embodiment of the invention, the method for drawing the graph based on the three-dimensional map engine acquires the key points of the drawn graph information, calls the related rear-end interface through the callback of the key point event after the callback is drawn, displays the query result set through the corresponding model loading method, realizes the determination of the position of the target point to be queried in the target area to be queried in the three-dimensional space scene, obtains the position information of the target point to be queried as the three-dimensional space position, namely, the position information comprises two-dimensional plane information and depth information, realizes the accurate query of the target point, and can accurately position the spatial position of the query target in the three-dimensional space scene.
The implementation procedure for judging the position relationship between the target point to be queried and the target area to be queried by adopting the ray method can be as follows:
the ray method judges the position relation between a target point (point) to be inquired and a target area (polygon) to be inquired, the polygon is a simple polygon, and vertexes are arranged anticlockwise;
if the target point to be inquired is in the target area to be inquired, returning to 0;
if the target point to be inquired is on the side of the target area to be inquired, returning to 1;
if the target point to be inquired is outside the target area to be inquired, returning to step 2;
const double INFINITY=1e10;
const double ESP=1e-5;
constint MAX_N=1000;
struct Point{
doublex,y;
};
struct LineSegment{
Point pt1,pt2
};
typedef vector<Point>Polygon;
// calculate cross product | P0P1|×|P0P2|
double Multiply(Point p1,Point p2,Point p0)
{
return((p1.x-p0.x)*(p2.y-p0.y)-(p2.x-p0.x)*(p1.y-p0.y));
}
// determining whether the line segment contains a point
bool IsOnline(Point point,LineSegment line)
{
return((fabs(Multiply(line.pt1,line.pt2,point))<ESP)&&
((point.x-line.pt1.x)*(point.x-line.pt2.x)<=0)&&
((point.y-line.pt1.y)*(point.y-line.pt2.y)<=0));
}
// determining line segment intersection
bool Intersect(LineSegment L1,LineSegment L2)
{
return((max(L1.pt1.x,L1.pt2.x)>=min(L2.pt1.x,L2.pt2.x))&&(max(L2.pt1.x,L2.pt2.x)>=min(L1.pt1.x,L1.pt2.x))&&
(max(L1.pt1.y,L1.pt2.y)>=min(L2.pt1.y,L2.pt2.y))&&
(max(L2.pt1.y,L2.pt2.y)>=min(L1.pt1.y,L1.pt2.y))&&
(Multiply(L2.pt1,L1.pt2,L1.pt1)*Multiply(L1.pt2,L2.pt2,L1.pt1)>=0)&&
(Multiply(L1.pt1,L2.pt2,L2.pt1)*Multiply(L2.pt2,L1.pt2,L2.pt1)>=0)
);
}
// judge Point within polygon
bool InPolygon(const Polygon&polygon,Pointpoint)
{
int n=polygon.size();
int count=0;
LineSegment line;
line.pt1=point;
line.pt2.y=point.y;
line.pt2.x=-INFINITY;
for(inti=0;i<n;i++){
// obtaining an edge of a polygon
LineSegmentside;
side.pt1=polygon[i];
side.pt2=polygon[(i+1)%n];
if(IsOnline(point,side)){
return1;
}
If the side is parallel to the x-axis then this is not taken into account
if(fabs(side.pt1.y-side.pt2.y)<ESP){
continue;
}
if(IsOnline(side.pt1,line)){
if(side.pt1.y>side.pt2.y)count++;
}elseif(IsOnline(side.pt2,line)){
if(side.pt2.y>side.pt1.y)count++;
}else if(Intersect(line,side)){
count++;
}
}
if(count%2==1){return0;}
else{return2;}
}
}
Optionally, in a specific implementation manner, referring to fig. 3, based on the above embodiment, an embodiment of the present invention may further include:
s105: and converting the three-dimensional position information into corresponding character position information and sending the corresponding character position information to the user side.
When a plurality of target points to be queried are obtained through query, the plurality of spatial position information can be converted into corresponding character position information and sent to the user side.
And when the target point to be inquired does not exist in the target area to be inquired, sending the information which is not inquired to the target point to the client.
The user side is a hardware device bearing pre-bound user account information, such as an intelligent mobile terminal device, a mobile phone, a tablet and the like.
The user can directly store the position information or conveniently search the position information, and the use experience of the user is improved.
The embodiment of the invention also provides a corresponding implementation device for the query method of the three-dimensional target, so that the method has higher practicability. In the following, the query device of a three-dimensional object provided by the embodiment of the present invention is introduced, and the query device of a three-dimensional object described below and the query method of a three-dimensional object described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a block diagram of an apparatus for querying a three-dimensional object according to an embodiment of the present invention, in a specific implementation manner, where the apparatus may include:
the information obtaining module 401 is configured to obtain a target point to be queried and a target area to be queried in a three-dimensional spatial scene.
And a vertex coordinate obtaining module 402, configured to call back the target point to be queried, and obtain a vertex coordinate of the target area to be queried.
The query module 403 is configured to, in the process of querying the target point to be queried in the target area to be queried, determine, by using a ray method, a position relationship between the target point to be queried and the target area to be queried according to the vertex coordinates returned by callback, and determine a position of the target point to be queried in the target area to be queried.
And the display module 404 is configured to display, in a three-dimensional space scene, a three-dimensional position of a target point to be queried obtained by querying in a model loading manner.
Optionally, in some embodiments of this embodiment, referring to fig. 5, the apparatus may further include:
and a sending module 405, configured to convert the three-dimensional position information into corresponding text position information, and send the text position information to the user side.
In a specific embodiment, the query module 403 may include:
the straight line generation submodule is used for generating a straight line parallel to the X axis by taking a target point to be inquired as a starting point and taking infinity as an end point;
the cyclic judgment sub-module is used for cyclically taking each edge of the target area to be inquired and executing the following judgment process; when the current side of the target area to be inquired is not parallel to the straight line, judging whether the target point to be inquired is on the current side; if so, returning the result of the target point to be inquired on the edge of the target area to be inquired; if not, judging whether the straight line and the current edge are intersected; if yes, counting the intersection points; if not, taking the other edge of the target area to be inquired, which is not the current edge;
the intersection point total counting submodule is used for counting the total number of intersection points when each edge of the target area to be inquired is circularly taken;
the result feedback submodule is used for returning the result of the target point to be inquired in the target area to be inquired if the total number of the intersection points is an odd number; if the total number of the intersection points is an even number, returning a result that the target point to be inquired is not in the target area to be inquired.
Optionally, in another embodiment, the information obtaining module 301 may include:
the receiving submodule is used for receiving the query resource type and the query target area range selected by the user;
the generation sub-module is used for generating a target point to be queried according to the query resource type selected by the user; and generating a target area to be queried according to the query target area range.
The functions of the functional modules of the query device of the three-dimensional target according to the embodiments of the present invention may be specifically implemented according to the method in the above method embodiments, and the specific implementation process may refer to the related description of the above method embodiments, which is not described herein again.
As can be seen from the above, in the method for drawing a graph based on a three-dimensional map engine according to the embodiments of the present invention, key points of the drawn graph information are acquired, a relevant backend interface is called by callback of a key point event after the callback is drawn, and a query result set is displayed by a corresponding model loading method, so that the position of a target point to be queried in a target area to be queried is determined in a three-dimensional space scene, and the obtained position information of the target point to be queried is a three-dimensional space position, that is, the position information includes both two-dimensional plane information and depth information, so that accurate query of the target point is achieved, and the spatial position of the query target can be accurately located in the three-dimensional space scene.
The embodiment of the present invention further provides a device for querying a three-dimensional target, which specifically includes:
a memory for storing a computer program;
a processor for executing a computer program to implement the steps of the method for querying a three-dimensional object as described in any one of the above embodiments.
The functions of the functional modules of the three-dimensional target query device according to the embodiments of the present invention may be specifically implemented according to the query method of the three-dimensional target in the above method embodiments, and the specific implementation process may refer to the description related to the above method embodiments, which is not described herein again.
Therefore, the embodiment of the invention realizes the accurate query of the target point and can accurately position the spatial position of the query target in the three-dimensional space scene.
The embodiment of the present invention further provides a computer-readable storage medium, in which a query program of a three-dimensional object is stored, and the steps of the query method of the three-dimensional object according to any one of the above embodiments are performed when the query program of the three-dimensional object is executed by a processor.
The functions of the functional modules of the computer-readable storage medium according to the embodiment of the present invention may be specifically implemented according to the query method of the three-dimensional object in the above method embodiment, and the specific implementation process may refer to the description related to the above method embodiment, which is not described herein again.
Therefore, the embodiment of the invention realizes the accurate query of the target point and can accurately position the spatial position of the query target in the three-dimensional space scene.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The present invention provides a method, an apparatus, a device and a computer readable storage medium for querying a three-dimensional object. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (8)

1. A method for querying a three-dimensional target is characterized in that the method for drawing a graph based on a three-dimensional map engine comprises the following steps:
acquiring a target point to be inquired and a target area to be inquired in a three-dimensional space scene;
calling back the target point to be queried to obtain the vertex coordinates of the target area to be queried;
in the process of inquiring the target point to be inquired in the target area to be inquired, determining the position of the target point to be inquired in the target area to be inquired by judging the position relation between the target point to be inquired and the target area to be inquired by using the vertex coordinates returned by callback;
displaying and querying by utilizing a model loading mode in the three-dimensional space scene to obtain the three-dimensional position of the target point to be queried;
wherein the judging of the position relationship between the target point to be queried and the target area to be queried comprises:
generating a straight line parallel to the X axis by taking the target point to be inquired as a starting point and the infinity point as an end point;
circularly taking each edge of the target area to be inquired, and executing the following judgment process;
when the current edge of the target area to be inquired is not parallel to the straight line, judging whether the target point to be inquired is on the current edge; if so, returning the result of the target point to be inquired on the side of the target area to be inquired; if not, judging whether the straight line and the current edge are intersected; if yes, counting the intersection points; if not, taking the other edge of the target area to be inquired, which is not the current edge;
counting the total number of intersection points when each edge of the target area to be inquired is circularly taken;
if the total number of the intersection points is an odd number, returning the result of the target point to be inquired in the target area to be inquired;
and if the total number of the intersection points is an even number, returning a result that the target point to be inquired is not in the target area to be inquired.
2. The method for querying a three-dimensional target according to claim 1, wherein the target area to be queried has a circular or rectangular shape.
3. The method for querying a three-dimensional target according to claim 1 or 2, wherein after the displaying and querying by model loading to obtain the three-dimensional position of the target point to be queried, the method further comprises:
and converting the three-dimensional position information into corresponding character position information, and sending the corresponding character position information to a user side.
4. The method for querying a three-dimensional target according to claim 3, wherein the acquiring the target point to be queried and the target area to be queried in the three-dimensional space scene comprises:
receiving a query resource type and a query target area range selected by a user;
generating a target point to be queried according to the query resource type selected by the user; and generating a target area to be queried according to the query target area range.
5. An apparatus for querying a three-dimensional object, comprising:
the information acquisition module is used for acquiring a target point to be inquired and a target area to be inquired in a three-dimensional space scene;
the vertex coordinate acquisition module is used for calling back the target point to be queried and acquiring the vertex coordinates of the target area to be queried;
the query module is used for judging the position relation between the target point to be queried and the target area to be queried by utilizing a ray method through the vertex coordinates returned by callback in the process of querying the target point to be queried in the target area to be queried, and determining the position of the target point to be queried in the target area to be queried;
the display module is used for displaying and inquiring the three-dimensional position of the target point to be inquired in the three-dimensional space scene by using a model loading mode;
wherein the query module comprises:
the straight line generation submodule is used for generating a straight line parallel to the X axis by taking the target point to be inquired as a starting point and taking the infinity as an end point;
the cyclic judgment sub-module is used for cyclically taking each edge of the target area to be inquired and executing the following judgment process; when the current edge of the target area to be inquired is not parallel to the straight line, judging whether the target point to be inquired is on the current edge; if so, returning the result of the target point to be inquired on the side of the target area to be inquired; if not, judging whether the straight line and the current edge are intersected; if yes, counting the intersection points; if not, taking the other edge of the target area to be inquired, which is not the current edge;
the intersection point total counting submodule is used for counting the total number of intersection points when each edge of the target area to be inquired is circularly taken;
the result feedback submodule is used for returning the result of the target point to be inquired in the target area to be inquired if the total number of the intersection points is an odd number; and if the total number of the intersection points is an even number, returning a result that the target point to be inquired is not in the target area to be inquired.
6. The apparatus for querying a three-dimensional object according to claim 5, further comprising:
and the sending module is used for converting the three-dimensional position information into corresponding character position information and sending the corresponding character position information to the user side.
7. A method of querying a three-dimensional object, comprising a processor for implementing the steps of the method of querying a three-dimensional object according to any one of claims 1 to 4 when executing a computer program stored in a memory.
8. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method of querying a three-dimensional object according to any one of claims 1 to 4.
CN201810240491.5A 2018-03-22 2018-03-22 Three-dimensional target query method, device, equipment and computer readable storage medium Active CN108470058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810240491.5A CN108470058B (en) 2018-03-22 2018-03-22 Three-dimensional target query method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810240491.5A CN108470058B (en) 2018-03-22 2018-03-22 Three-dimensional target query method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108470058A CN108470058A (en) 2018-08-31
CN108470058B true CN108470058B (en) 2020-10-16

Family

ID=63265688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810240491.5A Active CN108470058B (en) 2018-03-22 2018-03-22 Three-dimensional target query method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108470058B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636874B (en) * 2018-12-17 2023-05-26 浙江科澜信息技术有限公司 Perspective projection method, system and related device for three-dimensional model
CN109669542B (en) * 2018-12-21 2020-06-30 浙江大学 Ray projection three-dimensional target selection method based on backtracking pointing interaction history
CN111209358A (en) * 2019-12-24 2020-05-29 武汉蜜蜂云科技有限公司 Method and device for counting equipment number in scenic spot area
CN112508293A (en) * 2020-12-16 2021-03-16 北京华胜天成科技股份有限公司 Monitoring method and system for monitoring supervision area, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101619976A (en) * 2008-07-01 2010-01-06 联想(北京)有限公司 Position positioning retrieval device and method
CN102890697A (en) * 2012-06-20 2013-01-23 杜小勇 Map limited region-based object searching method
CN103236058A (en) * 2013-04-25 2013-08-07 内蒙古科技大学 Method for obtaining volume of interest of four-dimensional heart image
CN103870665A (en) * 2014-04-08 2014-06-18 哈尔滨工业大学 Method for three-dimensional dynamic simulation in space manipulator auxiliary butt-joint process
CN106920278A (en) * 2017-03-03 2017-07-04 合肥工业大学 A kind of viaduct three-dimensional modeling method based on Reeb figures

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7852335B2 (en) * 2005-05-09 2010-12-14 Siemens Medical Solutions Usa, Inc. Volume rendering processing distribution in a graphics processing unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101619976A (en) * 2008-07-01 2010-01-06 联想(北京)有限公司 Position positioning retrieval device and method
CN102890697A (en) * 2012-06-20 2013-01-23 杜小勇 Map limited region-based object searching method
CN103236058A (en) * 2013-04-25 2013-08-07 内蒙古科技大学 Method for obtaining volume of interest of four-dimensional heart image
CN103870665A (en) * 2014-04-08 2014-06-18 哈尔滨工业大学 Method for three-dimensional dynamic simulation in space manipulator auxiliary butt-joint process
CN106920278A (en) * 2017-03-03 2017-07-04 合肥工业大学 A kind of viaduct three-dimensional modeling method based on Reeb figures

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
三维数据场可视化关键技术研究;黄易;《中国优秀硕士学位论文全文数据库 信息科技辑》;20061215(第12期);I138-1176 *

Also Published As

Publication number Publication date
CN108470058A (en) 2018-08-31

Similar Documents

Publication Publication Date Title
CN108470058B (en) Three-dimensional target query method, device, equipment and computer readable storage medium
EP3301996A1 (en) Method and mobile terminal for processing contacts
CN202502670U (en) Image processing apparatus
CN117078898A (en) Method, apparatus and medium for placing virtual objects for augmented or mixed reality applications
CN107092623B (en) Interest point query method and device
US9213422B2 (en) Method of automatically moving a cursor within a map viewport and a device incorporating the method
CN104572125B (en) Method for drafting, storage method, drawing apparatus and the storage device of entity relationship diagram
WO2013178038A1 (en) Position searching method and apparatus based on electronic map
CN103561065A (en) System and method for achieving 3D virtual advertisement with mobile terminal
US20140192055A1 (en) Method and apparatus for displaying video on 3d map
CN111881930A (en) Thermodynamic diagram generation method and device, storage medium and equipment
US20130127852A1 (en) Methods for providing 3d building information
CN105894551B (en) Image drawing method and device
AU2018221091A1 (en) Method for processing logistics package delivery route, and related device
CN115081414B (en) Spreadsheet generation method, device, equipment and medium based on data model
TWI425193B (en) Method and electronic device for fetching geographic information
CN110782534B (en) 3D character color gradient method, medium, equipment and device
CN106202237B (en) Industrial project area map drawing method and system
CN106611443B (en) Three-dimensional topographic point picking method and device
CN106488402B (en) Ground is made an inventory rendering method and relevant device
CN109657022A (en) Trade company&#39;s lookup method, device, electronic equipment and storage medium
CN113157214A (en) Remote sensing image display method, device, equipment and storage medium
CN113844034B (en) Three-dimensional model punching processing method, printing method, related equipment and storage medium
CN115794980A (en) Data display method, equipment, device and medium
CN112484678B (en) Accurate measurement method and device based on virtual three-dimensional space

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