The basic structure defining a way "point" along a path through a navigation mesh. It consists of the navigation mesh edge to pass through and the node one should be in while heading to the edge.
More...
#include <WayPortal.h>
|
const NavMeshEdge * | _edge |
| The edge which serves as goal.
|
|
unsigned int | _nodeID |
| The index of the node in which the agent is traveling toward the edge. It should be true that the specified node is attached/connected to the given edge.
|
|
bool | _p0IsLeft |
| Reports if the edge's P0 is the left vertex. Left is defined based on moving across the portal from the node indicated by _nodeID;.
|
|
|
class | PortalRoute |
|
class | PortalPath |
|
The basic structure defining a way "point" along a path through a navigation mesh. It consists of the navigation mesh edge to pass through and the node one should be in while heading to the edge.
Menge::WayPortal::WayPortal |
( |
const NavMeshEdge * |
edge, |
|
|
unsigned int |
nodeID, |
|
|
bool |
p0IsLeft |
|
) |
| |
Constructor.
- Parameters
-
edge | The NavigationMeshEdge which serves as the immediate goal for this WayPortal. |
nodeID | The nav mesh node that an agent should be in while heading for this node. |
p0IsLeft | Indicates if the p0 value of the edge is on the left, when faced from inside the node. |
Vector2 Menge::WayPortal::getLeft |
( |
| ) |
const |
|
inline |
Retrives the left physical vertex of the portal.
- Returns
- The position of the left physical vertex, as viewed from inside _nodeID.
Vector2 Menge::WayPortal::getLeft |
( |
float |
offset | ) |
const |
|
inline |
Retrives the position in the portal offset from the left physical vertex.
- Parameters
-
offset | The distance offset from the left physical vertex. |
- Returns
- The position offset from the left physical vertex, as viewed from inside _nodeID.
Vector2 Menge::WayPortal::getRight |
( |
| ) |
const |
|
inline |
Retrives the right physical vertex of the portal.
- Returns
- The position of the right physical vertex, as viewed from inside _nodeID.
Vector2 Menge::WayPortal::getRight |
( |
float |
offset | ) |
const |
|
inline |
Retrives the position in the portal offset from the right physical vertex.
- Parameters
-
offset | The distance offset from the right physical vertex. |
- Returns
- The position offset from the right physical vertex, as viewed from inside _nodeID.
Computes the intersection point of the given line with this portal.
This algorithm ASSUMES that the line DOES intersect the portal. The behavior is undefined if they don't intersect.
- Parameters
-
point | A point on the line to test. |
dir | A direction vector defining the position of the line. |
- Returns
- A point, on the portal, at which the line intersects.
Sets the directions on the preferred velocity based on the wayportal.
- Parameters
-
pos | The position of the agent. |
radius | The radius of the agent. |
dir | Preferred direction of the agent. Direction is NOT assumed to be of unit-length. |
pVel | The preferred velocity |
The documentation for this class was generated from the following files:
- src/menge/MengeCore/resources/WayPortal.h
- src/menge/MengeCore/resources/WayPortal.cpp