CN112507571B - Military chess full-sight analysis method, terminal equipment and computer readable storage medium - Google Patents

Military chess full-sight analysis method, terminal equipment and computer readable storage medium Download PDF

Info

Publication number
CN112507571B
CN112507571B CN202110078476.7A CN202110078476A CN112507571B CN 112507571 B CN112507571 B CN 112507571B CN 202110078476 A CN202110078476 A CN 202110078476A CN 112507571 B CN112507571 B CN 112507571B
Authority
CN
China
Prior art keywords
enemy
chess
chessman
terrain
instruction
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
CN202110078476.7A
Other languages
Chinese (zh)
Other versions
CN112507571A (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.)
Bozhi Safety Technology Co ltd
Original Assignee
Bozhi Safety 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 Bozhi Safety Technology Co ltd filed Critical Bozhi Safety Technology Co ltd
Priority to CN202110078476.7A priority Critical patent/CN112507571B/en
Publication of CN112507571A publication Critical patent/CN112507571A/en
Application granted granted Critical
Publication of CN112507571B publication Critical patent/CN112507571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Abstract

The invention discloses a method for analyzing the visibility of a chess, a terminal device and a computer readable storage medium, wherein the method comprises the following steps: acquiring basic information data of all the chesses in the same three-dimensional coordinate system, wherein the basic information data comprises a communication range; determining instruction chessmen, and determining all enemy chessmen within the sight range of the instruction chessmen according to the instruction chessmen; taking the instruction chessman as an original point, and emitting a ray to all enemy chessmen in the sight range; and judging whether the ray collides with the enemy chessman or not, and if so, instructing the chessman to see through with the collided enemy chessman. The invention solves the problems of slow through calculation and low efficiency in the traditional war game deduction, reduces the calculation times, saves the time, can obtain the through result of the chess pieces in a shorter time, and improves the calculation efficiency and the accuracy; meanwhile, the method is simple in overall operation, and reduces the CPU resource consumption and the memory occupation of the intelligent equipment.

Description

Military chess full-sight analysis method, terminal equipment and computer readable storage medium
Technical Field
The application relates to a method for analyzing the visibility of a weapon chess, terminal equipment and a computer readable storage medium, in particular to a method for quickly screening enemy chess pieces with visibility in weapon chess deduction, the terminal equipment and the computer readable storage medium, belonging to the technical field of weapon chess deduction.
Background
With the development of computer technology, traditional strict weapons are beginning to be digitalized. The computer war game technology in China starts late, becomes a research hotspot of various colleges and companies in recent years, the research contents mainly focus on explaining the nature and the characteristics of war games, researching war game map technology, chess maneuvering algorithms, deduction rule systems and the like, and some companies or research organizations design and develop war game deduction systems of tactical level, battle level and the like with different scales and different synthetic war varieties. Most of the traditional automatic deduction of the weapons and chess is manual operation, and the mode of confrontation of people is that the intelligent weapons and chess begin to become a research hotspot along with the development of the internet of things, big data and artificial intelligence technology.
In the prior art, in the process of wargame deduction, a common view algorithm needs comparison of all points in a calculation range, a lot of redundant calculation exists, and with the increase of chess pieces, a lot of repeated calculation is increased, so that software operation resources are seriously wasted.
Disclosure of Invention
The objective of the present application is to provide a military chess full-sight analysis method, a terminal device and a computer-readable storage medium, so as to solve the problems proposed in the above background art.
The first embodiment of the invention discloses a method for analyzing the visibility of a chess, which comprises the following steps:
acquiring basic information data of all the chess pieces under the same three-dimensional coordinate system, wherein the basic information data comprise a communication range;
determining instruction chessmen, and determining all enemy chessmen within the sight range of the enemy chessmen according to the instruction chessmen;
taking the instruction chess piece as an original point, and transmitting a ray to all enemy chess pieces in the sight range of the instruction chess piece;
and judging whether the ray collides with the enemy chessman or not, and if the ray collides with the enemy chessman, enabling the instruction chessman to see through with the collided enemy chessman.
Preferably, the basic information data further comprises coordinate positions, elevations and heights of the chessmen;
correspondingly, the obtaining of the basic information data of all the chess pieces under the same three-dimensional coordinate system specifically includes:
establishing a three-dimensional coordinate system, and generating a hexagonal grid with terrain attributes in the three-dimensional coordinate system;
determining a terrain attribute corresponding to each grid, wherein the terrain attribute comprises a coordinate position and an elevation;
and obtaining the grids to which the chess pieces belong, and determining basic information data of the chess pieces by combining the terrain attributes of the grids to which the chess pieces belong, the heights of the chess pieces and the visibility range.
Preferably, after the determining the terrain attribute corresponding to each grid, the method further includes:
setting a unique number for each grid;
establishing a grid index table according to the serial numbers and the corresponding terrain attributes;
correspondingly, obtaining the grid to which the chess piece belongs, and determining the basic information data of the chess piece by combining the terrain attribute of the grid to which the chess piece belongs, the height of the chess piece and the visibility range, specifically:
acquiring the number of the grid to which the chessman belongs, and acquiring the topographic attribute of the grid to which the chessman belongs by combining the grid index table;
acquiring the height and the visibility range of the chess pieces;
and determining basic information data of the chess pieces by combining the terrain attributes of the grids and the heights and the visibility ranges of the chess pieces.
Preferably, the instruction chess pieces are determined, and all enemy chess pieces in the sight range of the instruction chess pieces are determined according to the instruction chess pieces, specifically:
determining an instruction chess piece;
calculating the distance between the enemy chessman and the instruction chessman; when the distance is smaller than or equal to the threshold value of the sight range of the instruction chess piece, the enemy chess piece is positioned in the sight range of the instruction chess piece;
and acquiring all enemy chessmen within the sight range of the instruction chessman.
Preferably, before the determining whether the ray hits the enemy chessman, the method further includes:
judging whether the ray collides with the terrain, if so, the instruction chess piece is invisible to the corresponding enemy chess piece; and if the ray does not collide with the terrain, judging whether the ray collides with the enemy chessman or not.
Preferably, the determining whether the ray collides with the terrain specifically includes:
a linear search is performed on the ray, and if a point on the terrain and a point under the terrain are found, the ray collides with the terrain.
Preferably, the performing a linear search on the ray, if finding a point on the terrain and a point under the terrain, further includes, after the ray collides with the terrain:
a dichotomy search is performed between a point on the terrain and a point under the terrain to determine a specific collision point.
Preferably, the determining whether the ray collides with the enemy chess piece specifically includes:
and judging whether the ray collides the enemy chessman or not by using a slab collision detection method.
A second embodiment of the present invention discloses a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program.
A third embodiment of the invention discloses a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the above-described method.
Compared with the prior art, the weapon and chess full-view analysis method, the terminal equipment and the computer readable storage medium have the following beneficial effects:
the invention solves the problems of slow through calculation and low efficiency in the traditional war game deduction, reduces the calculation times, saves the time, can obtain the through result of the chess pieces in a shorter time, and improves the calculation efficiency and the accuracy; meanwhile, the method is simple in overall operation, and reduces the CPU resource consumption and the memory occupation of the intelligent equipment.
According to the method, the chess pieces are manufactured in a three-dimensional scene according to the principle of diffuse reflection and light transmission along a straight line, the emitted rays are used for simulation, and the chess pieces are found when the rays collide with enemy chess pieces, so that the purpose of chess piece communication is achieved.
The invention brings great improvement to the execution efficiency of the military chess visual system and the accuracy of the visual result. A three-dimensional engine technology is used for simulating and constructing a battlefield environment, and a three-dimensional ray form is used for simulating the diffuse reflection effect of light, so that a more real battlefield investigation effect is achieved. The investigation instruction in the chess can be embodied more perfectly, and the effect that all the chess pieces can be instantly investigated is achieved.
Drawings
FIG. 1 is a flow chart of a military chess full-view analysis method of the present invention;
FIG. 2 is a schematic view of a chess piece in the chess visual analysis method of the present invention;
FIG. 3 is a 2D graph for explaining the slab algorithm in the military chess full-sight analysis method of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
The present invention will be described in detail with reference to examples, but the present invention is not limited to these examples.
FIG. 1 is a flow chart of a military chess full-sight analysis method of the present invention.
The invention relates to a military chess full-sight analysis method, which comprises the following steps:
step 1, obtaining basic information data of all the chesses in the same three-dimensional coordinate system, wherein the basic information data comprises a communication range;
step 2, determining instruction chessmen, and determining all enemy chessmen within the sight range of the instruction chessmen according to the instruction chessmen;
step 3, with the instruction chess as the original point, emitting a ray to all enemy chess in the sight range; connecting a line segment between the coordinate of the command chess piece and the coordinate of all screened enemy chess pieces;
and 4, judging whether the ray collides with the enemy chessman or not, and if the ray collides with the enemy chessman, instructing the chessman to see through with the collided enemy chessman.
The step 1 is implemented as follows:
step 1.1, establishing a three-dimensional coordinate system, and generating a hexagonal grid with topographic attributes in the three-dimensional coordinate system; the hexagonal grid is used as a chessboard for bearing the chess pieces, and each chess piece is required to be positioned in one hexagonal grid after the instruction execution is finished.
Step 1.2, determining a terrain attribute corresponding to each grid, wherein the terrain attribute comprises a coordinate position and an elevation;
and step 1.3, obtaining grids to which the chess pieces belong, and determining basic information data of the chess pieces by combining the terrain attributes of the grids to which the chess pieces belong, the heights of the chess pieces and the visibility range. The basic information data in the implementation also comprises coordinate positions, elevations, heights of the chessmen and a communication range.
Further, in order to obtain the attribute of each grid and increase the speed of obtaining the basic information data of the chessman, an intermediate step is further provided between step 1.2 and step 1.3, specifically as follows:
step 1.2 → 1.3, setting a unique number for each grid; establishing a grid index table according to the serial numbers and the corresponding terrain attributes;
based on the steps, the step 1.3 is as follows:
step 1.3.1, acquiring the number of a grid to which the chessman belongs, and acquiring the topographic attribute of the grid to which the chessman belongs by combining a grid index table;
step 1.3.2, obtaining the height and the visibility range of the chessmen;
and step 1.3.3, determining basic information data of the chess pieces by combining the terrain attributes of the grids to which the chess pieces belong and the heights and the visibility ranges of the chess pieces.
Step 2 of this embodiment specifically includes:
step 2.1, determining instruction chessman;
step 2.2, calculating the distance between the enemy chessman and the instruction chessman; when the distance is smaller than or equal to the threshold value of the sight range of the instruction chess piece, the enemy chess piece is positioned in the sight range of the instruction chess piece;
and 2.3, determining all enemy chessmen within the communication range of the instruction chessman.
When the program runs, the data of all the pieces of the enemy and the my both sides can be obtained, the distance between all the pieces of the enemy and the instruction piece is calculated only once, the pieces of the enemy smaller than the sight range are within the sight range of the piece, and the pieces of the enemy are all the pieces of the enemy screened out.
In this embodiment, a step 3 → 4 is further included between step 3 and step 4, specifically:
step 3 → 4, judging whether the ray collides with the terrain, if so, instructing the chess pieces to be invisible with the corresponding enemy chess pieces, and stopping detection; and if the ray does not collide with the terrain, judging whether the ray collides with the enemy chessman or not. Thereby detecting the certainty of the collision. In this embodiment, to detect the collision between the ray and the terrain, collision detection may be performed between the ray and the altitude map, so as to replace the collision detection between the ray and the terrain mesh (many triangles), and determine whether the ray collides with the terrain, specifically:
a linear search is performed on the ray, and if a point on the terrain and a point under the terrain are found, the ray collides with the terrain. After this step, to further determine the collision point, a dichotomy search may be performed between a point on the terrain and a point under the terrain to determine a specific collision point. Whether a specific collision point needs to be acquired or not is determined according to actual needs. If not, the step of acquiring the collision point is not executed.
Step 4 in this embodiment specifically includes: and judging whether the ray collides with the enemy chessman or not by using a slab collision detection method, and if the ray collides with the enemy chessman, instructing the chessman to see through with the collided enemy chessman. Specifically, whether a ray collides with an enemy chessman or not can be detected, and the problem that the ray collides with an AABB (Axially Aligned Bounding Box) can be solved by using a collision detection algorithm of slab, wherein the slab refers to a space between two parallel planes, the basic idea is that a cube or a sphere completely wraps a 3D object, and an AABB Box in the 3D space is regarded as an intersection of slabs in 3 directions formed by 3 groups of parallel planes of the AABB.
If the ray does not coincide with the intersected line segments of the 3 slabs, the line segments cannot exist in the 3 slabs simultaneously, and the line segments cannot exist in an AABB box, and whether the ray collides with the chess pieces can be quickly calculated by using the method.
As shown in FIG. 2, a three-dimensional rectangular coordinate system is established with a hexagonal grid applied to the ground, assuming P0 as the command pawn, A1 and A2 as the enemy pawns, and the pawns move in units of hexagons. The positions of the chess pieces P0, A1 and A2 are based on the center points of the hexagons in which the chess pieces are positioned, the height of the Z axis of the hexagons in which the chess pieces are positioned is the elevation, and the range in which the circles are positioned is the perspective range of the chess pieces.
As shown in fig. 3, the present application uses a 2D graph to explain the slab algorithm.
According to the collision detection algorithm of the slab, introducing the concept of a candidate face: in 3D space, three faces facing the Ray are determined first, that is, three candidate faces can be determined by somehow ignoring the back of the AABB with respect to the Ray. These three candidate faces are the nearest faces that are likely to intersect with Ray.
According to this definition, the following three conclusions can be drawn:
the property one is as follows: if a point is in AABB, then this point must be in these 3 slabs at the same time.
Property II: if a ray intersects an AABB, then the intersection of the ray with 3 slabs must have an overlap.
Property III: when a Ray intersects one of the three candidate surfaces, the Ray has its origin at a longer distance from the surface than from the other surfaces.
It is easier to understand that if the ray does not coincide with the 3 slab intersection segments, then these segments cannot exist in 3 slabs at the same time, and cannot be in the AABB box.
In FIG. 3, the ray is shot in the lower right corner and in the upper left corner, and the ray passes through a point A, where the candidate faces are the y1 face and the x2 face. From the above properties, it can be seen that point a is simultaneously in 2 slabs in 2D space; furthermore, according to property two, because the ray intersects a plane, then the intersection of this ray with the slab must have an overlap, because the a point is on the ray and in the plane, then max (t1, t2) < = tA < = min (t3, t4) can be obtained; according to the third property: when crossed, it can be seen that t2> t 1. Similarly, the above verification process can be generalized to three dimensions. In the three-dimensional space, assuming that distances from the ray to the 3 candidate surfaces are t1, t2, and t3, respectively, and distances from the ray to the surfaces corresponding to the candidate surfaces are t4, t5, and t6, respectively, then according to property two, the condition that the ray collides with the AABB is max (t1, t2, t3) < = min (t4, t5, t 6); if intersection occurs, then the distance of the ray to the nearest intersection plane is max according to property three (t1, t2, t 3).
Based on the above properties, determining whether a ray intersects with an AABB requires three steps:
1. how to determine candidate faces: if the plane equation is substituted into the equation of the Ray, the t values of the two planes are obtained, and then the smaller t value naturally crosses the Ray first, it is indicated as a candidate plane. The ray can be represented by parametric equations as R (t) = P0 + t.d, (where P0 is the ray origin and d is the ray's direction vector)
2. Equation of how to determine candidate faces: the plane is given by the implicit definition equation X · n = D, (where X is the point on the plane, n is the plane normal vector, and D is the distance from the origin to the plane). Since the slab plane of the AABB is parallel to two coordinate axes, and the normal of its surface always has two components of 0 and the other component always is 1, we use the normal of 1 for a certain axis component consistently. If the above equation represents the left face of the AABB box, then n in the equation represents (1,0,0), but when the above equation represents the right face of the AABB box, the value represented by n is still (1,0, 0).
3. How to judge whether the intersection is on the AABB box: judging from the property two that the condition for the ray to collide with the AABB is max (t1, t2, t3) < = min (t4, t5, t 6).
From this, a uniform t-value formula can be derived:
when the candidate plane is perpendicular to both planes of the x axis, t = (D-Px)/dx.
When the candidate plane is perpendicular to both planes of the y-axis, t = (D-Py)/dy.
When the candidate plane is perpendicular to both planes of the z axis, t = (D-Pz)/dz.
A second embodiment of the invention discloses a terminal device comprising a memory, a processor and a computer program, such as a software development program, stored in the memory and executable on the processor, the steps of the method being implemented when the processor executes the computer program.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in a memory and executed by a processor to implement the present invention. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of a computer program in a terminal device. For example, the computer program may be divided into an acquisition module, an execution module, and the like.
The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The terminal device may include, but is not limited to, a processor, a memory.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be an internal storage unit of the terminal device, such as a hard disk or a memory of the terminal device. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used for storing computer programs and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. 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.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, to instruct related hardware.
A third embodiment of the invention discloses a computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Although the present application has been described with reference to a few embodiments, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the application as defined by the appended claims.

Claims (7)

1. A military chess full-sight analysis method is characterized by comprising the following steps:
acquiring basic information data of all the chess pieces under the same three-dimensional coordinate system, wherein the basic information data comprises a communication range: establishing a three-dimensional coordinate system, and generating a hexagonal grid with terrain attributes in the three-dimensional coordinate system; determining a terrain attribute corresponding to each grid, wherein the terrain attribute comprises a coordinate position and an elevation;
setting a unique number for each grid; establishing a grid index table according to the serial numbers and the corresponding terrain attributes;
obtaining a grid to which the chess piece belongs, and determining basic information data of the chess piece by combining the terrain attribute of the grid to which the chess piece belongs and the height and the sight range of the chess piece: acquiring the number of the grid to which the chessman belongs, and acquiring the topographic attribute of the grid to which the chessman belongs by combining the grid index table; acquiring the height and the visibility range of the chess pieces; determining basic information data of the chess pieces by combining the terrain attributes of the grids and the heights and the sight ranges of the chess pieces, wherein the basic information data comprise coordinate positions, elevations and the heights and the sight ranges of the chess pieces;
determining instruction chessmen, and determining all enemy chessmen within the sight range of the enemy chessmen according to the instruction chessmen;
taking the instruction chess piece as an original point, and transmitting a ray to all enemy chess pieces in the sight range of the instruction chess piece;
judging whether the ray collides with the terrain, if so, the instruction chess piece is invisible to the corresponding enemy chess piece; if the ray does not collide with the terrain, judging whether the ray collides with the enemy chessman or not;
and judging whether the ray collides with the enemy chessman or not, and if the ray collides with the enemy chessman, enabling the instruction chessman to see through with the collided enemy chessman.
2. A chess full-sight analysis method as claimed in claim 1, characterized in that said determining instruction chessman, based on said instruction chessman, determines all enemy chessman in its full-sight range, specifically:
determining an instruction chess piece;
calculating the distance between the enemy chessman and the instruction chessman; when the distance is smaller than or equal to the threshold value of the sight range of the instruction chess piece, the enemy chess piece is positioned in the sight range of the instruction chess piece;
determining all enemy chessmen within the sight range of the instruction chessman.
3. The chess full-sight analysis method according to claim 1, wherein said judging whether the ray collides with the terrain specifically comprises:
a linear search is performed on the ray, and if a point on the terrain and a point under the terrain are found, the ray collides with the terrain.
4. A chess full-sight analysis method according to claim 3, characterized in that said performing a linear search on said ray, if a point on the terrain and a point under the terrain are found, after said ray has collided with said terrain, further comprises:
a dichotomy search is performed between a point on the terrain and a point under the terrain to determine a specific collision point.
5. The chess full-sight analysis method according to claim 1, wherein said judging whether the ray collides with the enemy chess is specifically:
and judging whether the ray collides the enemy chessman or not by using a slab collision detection method.
6. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202110078476.7A 2021-01-21 2021-01-21 Military chess full-sight analysis method, terminal equipment and computer readable storage medium Active CN112507571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110078476.7A CN112507571B (en) 2021-01-21 2021-01-21 Military chess full-sight analysis method, terminal equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110078476.7A CN112507571B (en) 2021-01-21 2021-01-21 Military chess full-sight analysis method, terminal equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112507571A CN112507571A (en) 2021-03-16
CN112507571B true CN112507571B (en) 2022-01-04

Family

ID=74952496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110078476.7A Active CN112507571B (en) 2021-01-21 2021-01-21 Military chess full-sight analysis method, terminal equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112507571B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011073361A1 (en) * 2009-12-16 2011-06-23 The Provost, Fellows, Foundation Scholars, And Other Members Of Board, Of The College Of The Holy And Undivided Trinity Of Queen Elizabeth, Near Dublin A micro-architecture system and method for ray tracing and collision detection
CN111523240A (en) * 2020-04-28 2020-08-11 鲁东大学 Through-viewing analysis method based on DEM data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8188997B2 (en) * 2000-06-19 2012-05-29 Mental Images Gmbh Accelerated ray tracing using shallow bounding volume hierarchies
KR102242566B1 (en) * 2014-06-30 2021-04-20 삼성전자주식회사 Apparatus and method for processing ray tracing
CN108090947B (en) * 2018-01-03 2021-04-13 沈阳品尚科技有限公司 Ray tracing optimization method for 3D scene

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011073361A1 (en) * 2009-12-16 2011-06-23 The Provost, Fellows, Foundation Scholars, And Other Members Of Board, Of The College Of The Holy And Undivided Trinity Of Queen Elizabeth, Near Dublin A micro-architecture system and method for ray tracing and collision detection
CN111523240A (en) * 2020-04-28 2020-08-11 鲁东大学 Through-viewing analysis method based on DEM data

Also Published As

Publication number Publication date
CN112507571A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
US8234234B2 (en) Utilizing ray tracing for enhanced artificial intelligence path-finding
DE102016103874A1 (en) Systems and methods for soft shading in 3D rendering
CN101615305B (en) Method and device for detecting collision
CN101071515A (en) Method for realizing three-dimensional game collision detection at server end
US20080231627A1 (en) Using Ray Tracing to Enhance Artificial Intelligence Character Behavior
CN109633570B (en) Rapid random-shape foil strip cloud cluster modeling method
CN113674389B (en) Scene rendering method and device, electronic equipment and storage medium
CN114419240B (en) Illumination rendering method and device, computer equipment and storage medium
CN110907901A (en) Sea warfare passive interference calculation and evaluation method based on TDSBR
US10824775B2 (en) Simulation method and device for determining collision between objects
CN113244619B (en) Data processing method, device, equipment and storage medium
CN115081195A (en) Laser radar simulation method and device, electronic equipment and storage medium
CN112507571B (en) Military chess full-sight analysis method, terminal equipment and computer readable storage medium
CN112386912B (en) Ground reconnaissance and visibility adjudication method, terminal device and computer-readable storage medium
Alkaya et al. Performance of migrating birds optimization algorithm on continuous functions
US8200041B2 (en) Hardware accelerated silhouette detection
CN112704877B (en) Method for determining visibility range of aerial reconnaissance, terminal device and readable storage medium
KR101221198B1 (en) Method for collision detection on graphics processing units
US20070279421A1 (en) Vertex Shader Binning
CN116212388A (en) Shelter position determining method, shelter shielding method, corresponding device and electronic equipment
CN114398707B (en) Method, device and equipment for determining space shielding information
CN114359518A (en) Line patrol method, line patrol device, terminal equipment and computer readable storage medium
CN117504280A (en) Fragment effect rendering method, device, equipment and storage medium
CN116212369A (en) Method, device, electronic equipment and storage medium for determining visible set of potential object
CN116109756A (en) Ray tracing method, device, equipment and storage medium

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