A Namespace that contains functions for the Line Of Sight. More...
Functions | |
| bool | lineOfSight (JAM_Vec2 a, JAM_Vec2 b, std::vector< std::vector< JAM_Node * >> map, int nodeSize) |
| bool | lineLineIntersectionCheck (JAM_Vec2 a, JAM_Vec2 b, JAM_Vec2 c, JAM_Vec2 d, char axis) |
| void | drawLineOfSight (JAM_Vec2 a, JAM_Vec2 b, std::vector< std::vector< JAM_Node * >> map, int nodeSize, SDL_Renderer *renderer) |
| JAM_Vec2 | getNewTarget (JAM_Vec2 a, std::vector< std::vector< JAM_Node * >> map, int nodeSize) |
A Namespace that contains functions for the Line Of Sight.
| void JAM_LOS::drawLineOfSight | ( | JAM_Vec2 | a, |
| JAM_Vec2 | b, | ||
| std::vector< std::vector< JAM_Node * >> | map, | ||
| int | nodeSize, | ||
| SDL_Renderer * | renderer | ||
| ) |
Check if two positions can see each other and draw the tested tiles.
| a | Position a. |
| b | Position b. |
| map | A 2D vector of nodes. |
| nodeSize | The size of the node. |
| renderer | A pointer to the renderer. |

| JAM_Vec2 JAM_LOS::getNewTarget | ( | JAM_Vec2 | a, |
| std::vector< std::vector< JAM_Node * >> | map, | ||
| int | nodeSize | ||
| ) |
Find a new target position to go to.
| a | Position a. |
| map | A 2D vector of nodes. |
| nodeSize | The size of the node. |

| bool JAM_LOS::lineLineIntersectionCheck | ( | JAM_Vec2 | a, |
| JAM_Vec2 | b, | ||
| JAM_Vec2 | c, | ||
| JAM_Vec2 | d, | ||
| char | axis | ||
| ) |
Check if two lines intersect.
| a | Position a. (line 1) |
| b | Position b. (line 1) |
| v | Position c. (line 2) |
| d | Position d. (line 2) |
| axis | Axis that the second line being tested is on. |

| bool JAM_LOS::lineOfSight | ( | JAM_Vec2 | a, |
| JAM_Vec2 | b, | ||
| std::vector< std::vector< JAM_Node * >> | map, | ||
| int | nodeSize | ||
| ) |
Check if two positions can see each other.
| a | Position a. |
| b | Position b. |
| map | A 2D vector of nodes. |
| nodeSize | The size of the node. |


1.8.8