A visiblity cone. In order for an agent to be visible, they must lie within the visibility cone.
More...
|
| VisibilityCone (const Vector2 &dir0, const Vector2 &dir1) |
| Constructor - the visiblity cone is defined by two vectors. The cone is assumed to be the smaller angle subtending the two vectors. The constructor orders them appropriately. More...
|
|
bool | isVisible (const Vector2 &p0, const Vector2 &p1) const |
| Reports if any portion of a line segment lies within the visibility cone. More...
|
|
bool | isVisible (const Vector2 &p) const |
| Reports if the point lies within the visibility cone. More...
|
|
bool | intersect (const VisibilityCone &cone) |
| Intersects this cone with the given cone, changing the extent of this cone to adhere to the intersected span. More...
|
|
A visiblity cone. In order for an agent to be visible, they must lie within the visibility cone.
Menge::Agents::VisibilityCone::VisibilityCone |
( |
const Vector2 & |
dir0, |
|
|
const Vector2 & |
dir1 |
|
) |
| |
|
inline |
Constructor - the visiblity cone is defined by two vectors. The cone is assumed to be the smaller angle subtending the two vectors. The constructor orders them appropriately.
- Parameters
-
dir0 | One bound on the cone. |
dir1 | The other bound on the cone. |
bool Menge::Agents::VisibilityCone::intersect |
( |
const VisibilityCone & |
cone | ) |
|
|
inline |
Intersects this cone with the given cone, changing the extent of this cone to adhere to the intersected span.
- Parameters
-
cone | The cone to intersect this cone with. |
- Returns
- A boolean reporting if there is a non-empty intersection (true) or if there is no proper intersection (false).
bool Menge::Agents::VisibilityCone::isVisible |
( |
const Vector2 & |
p0, |
|
|
const Vector2 & |
p1 |
|
) |
| const |
|
inline |
Reports if any portion of a line segment lies within the visibility cone.
- Parameters
-
p0 | One end of the line segment. |
p1 | The other end of the line segment. |
- Returns
- A boolean which indicates if any portion of the segment lies in the cone (true) and is visible, or if it lies outside and is not visible (false).
bool Menge::Agents::VisibilityCone::isVisible |
( |
const Vector2 & |
p | ) |
const |
|
inline |
Reports if the point lies within the visibility cone.
- Parameters
-
- Returns
- A boolean which indicates if the point lies in the cone (true) and is visible, or if it lies outside and is not visible (false).
The documentation for this class was generated from the following file:
- src/menge/MengeCore/Agents/SpatialQueries/SpatialQueryNavMesh.cpp