Obstacle detector class used for example by SCR_GeneratorBaseEntity and ObjectBrushTool Refreshing Obstacles grabs all the possible obstacles HasObstacle checks depending on Avoid* settings Refreshing Obstacles -then- setting AvoidX is possible as first all obstacles are stored then used or not in the detection.
More...
|
void | SetupObstacleArrays (bool setupRoadSplines, bool setupAreaSplines) |
| Sets up needed arrays.
|
|
bool | BaseSplineQueryFilter (IEntity entity, bool getRoadSplines, bool getAreaSplines) |
| Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage AllSplineQueryFilter, RoadSplineQueryFilter, AreaSplineQueryFilter call it.
|
|
bool | AllSplineQueryFilter (IEntity entity) |
| Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage.
|
|
bool | RoadSplineQueryFilter (IEntity entity) |
| Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage.
|
|
bool | AreaSplineQueryFilter (IEntity entity) |
| Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage.
|
|
Obstacle detector class used for example by SCR_GeneratorBaseEntity and ObjectBrushTool Refreshing Obstacles grabs all the possible obstacles HasObstacle checks depending on Avoid* settings Refreshing Obstacles -then- setting AvoidX is possible as first all obstacles are stored then used or not in the detection.
◆ AllSplineQueryFilter()
bool SCR_ObstacleDetector.AllSplineQueryFilter |
( |
IEntity |
entity | ) |
|
|
protected |
Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage.
◆ AreaSplineQueryFilter()
bool SCR_ObstacleDetector.AreaSplineQueryFilter |
( |
IEntity |
entity | ) |
|
|
protected |
Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage.
◆ BaseSplineQueryFilter()
bool SCR_ObstacleDetector.BaseSplineQueryFilter |
( |
IEntity |
entity, |
|
|
bool |
getRoadSplines, |
|
|
bool |
getAreaSplines |
|
) |
| |
|
protected |
Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage AllSplineQueryFilter, RoadSplineQueryFilter, AreaSplineQueryFilter call it.
- Parameters
-
getRoadSplines | get "road-like" splines - roads, rivers, powerlines |
getAreaSplines | get area splines - lakes, forests |
- Returns
- true when done
◆ ClearObstacles()
void SCR_ObstacleDetector.ClearObstacles |
( |
| ) |
|
Empties obstacles information - a SCR_ObstacleDetector.RefreshObstaclesBy*() method must be called to use HasObstacle again.
◆ GetObstacles()
◆ HasObstacle()
bool SCR_ObstacleDetector.HasObstacle |
( |
vector |
worldPos, |
|
|
array< IEntity > |
exclusionList = null |
|
) |
| |
Detects obstacles based on current settings - a SCR_ObstacleDetector.RefreshObstaclesBy*() method must have been called earlier.
- Parameters
-
worldPos | the location to check - only the 2D position will be checked |
exclusionList | list of entities that should not be considered as obstacles |
- Returns
- true if an obstacle has been detected or on error, false otherwise
◆ HasObstaclesList()
bool SCR_ObstacleDetector.HasObstaclesList |
( |
| ) |
|
Check if calling HasObstacle is possible.
- Returns
- true if a search for obstacles (using Refresh.*Obstacles.* methods) has been called (after init or ClearObstacles call)
◆ RefreshAreaObstaclesBySphere()
void SCR_ObstacleDetector.RefreshAreaObstaclesBySphere |
( |
vector |
worldPos, |
|
|
float |
radius |
|
) |
| |
◆ RefreshAreaObstaclesByWorld()
void SCR_ObstacleDetector.RefreshAreaObstaclesByWorld |
( |
| ) |
|
◆ RefreshObstaclesByAABB()
void SCR_ObstacleDetector.RefreshObstaclesByAABB |
( |
vector |
worldMin, |
|
|
vector |
worldMax |
|
) |
| |
◆ RefreshObstaclesByWorld()
void SCR_ObstacleDetector.RefreshObstaclesByWorld |
( |
| ) |
|
◆ RefreshRoadObstaclesBySphere()
void SCR_ObstacleDetector.RefreshRoadObstaclesBySphere |
( |
vector |
worldPos, |
|
|
float |
radius |
|
) |
| |
◆ RoadSplineQueryFilter()
bool SCR_ObstacleDetector.RoadSplineQueryFilter |
( |
IEntity |
entity | ) |
|
|
protected |
Fills m_aAvoidInfo* arrays from RefreshObstaclesBy* request for HasObstacle usage.
◆ SetAvoidForests()
void SCR_ObstacleDetector.SetAvoidForests |
( |
bool |
avoidForests | ) |
|
◆ SetAvoidLakes()
void SCR_ObstacleDetector.SetAvoidLakes |
( |
bool |
avoidLakes | ) |
|
◆ SetAvoidLand()
void SCR_ObstacleDetector.SetAvoidLand |
( |
bool |
avoidLand | ) |
|
◆ SetAvoidLandOceanOffset()
void SCR_ObstacleDetector.SetAvoidLandOceanOffset |
( |
float |
offset | ) |
|
positive = above water, negative = below water
- Parameters
-
◆ SetAvoidObjects()
void SCR_ObstacleDetector.SetAvoidObjects |
( |
bool |
avoidObjects | ) |
|
◆ SetAvoidObjectsDetectionHeight()
void SCR_ObstacleDetector.SetAvoidObjectsDetectionHeight |
( |
float |
height | ) |
|
◆ SetAvoidObjectsDetectionRadius()
void SCR_ObstacleDetector.SetAvoidObjectsDetectionRadius |
( |
float |
radius | ) |
|
- Parameters
-
radius | accepts 0..inf radius - a negative value will be floored to zero |
◆ SetAvoidOcean()
void SCR_ObstacleDetector.SetAvoidOcean |
( |
bool |
avoidOcean | ) |
|
◆ SetAvoidPowerLines()
void SCR_ObstacleDetector.SetAvoidPowerLines |
( |
bool |
avoidPowerLines | ) |
|
◆ SetAvoidRivers()
void SCR_ObstacleDetector.SetAvoidRivers |
( |
bool |
avoidRivers | ) |
|
◆ SetAvoidRoads()
void SCR_ObstacleDetector.SetAvoidRoads |
( |
bool |
avoidRoads | ) |
|
◆ SetAvoidTracks()
void SCR_ObstacleDetector.SetAvoidTracks |
( |
bool |
avoidTracks | ) |
|
◆ SetupObstacleArrays()
void SCR_ObstacleDetector.SetupObstacleArrays |
( |
bool |
setupRoadSplines, |
|
|
bool |
setupAreaSplines |
|
) |
| |
|
protected |
Sets up needed arrays.
- Parameters
-
setupRoadSplines | instanciates "road" spline arrays |
setupAreaSplines | instanciates area spline arrays |
◆ m_aAvoidInfoForests
◆ m_aAvoidInfoLakes
◆ m_aAvoidInfoPowerLines
◆ m_aAvoidInfoRivers
◆ m_aAvoidInfoRoads
◆ m_aAvoidInfoTracks
◆ m_AvoidObjectTraceSphere
ref TraceSphere SCR_ObstacleDetector.m_AvoidObjectTraceSphere |
|
protected |
◆ m_bAvoidForests
bool SCR_ObstacleDetector.m_bAvoidForests |
|
protected |
◆ m_bAvoidLakes
bool SCR_ObstacleDetector.m_bAvoidLakes |
|
protected |
◆ m_bAvoidLand
bool SCR_ObstacleDetector.m_bAvoidLand |
|
protected |
◆ m_bAvoidObjects
bool SCR_ObstacleDetector.m_bAvoidObjects |
|
protected |
◆ m_bAvoidOcean
bool SCR_ObstacleDetector.m_bAvoidOcean |
|
protected |
◆ m_bAvoidPowerLines
bool SCR_ObstacleDetector.m_bAvoidPowerLines |
|
protected |
◆ m_bAvoidRivers
bool SCR_ObstacleDetector.m_bAvoidRivers |
|
protected |
◆ m_bAvoidRoads
bool SCR_ObstacleDetector.m_bAvoidRoads |
|
protected |
◆ m_bAvoidTracks
bool SCR_ObstacleDetector.m_bAvoidTracks |
|
protected |
◆ m_fAvoidLandOceanOffset
float SCR_ObstacleDetector.m_fAvoidLandOceanOffset |
|
protected |
◆ m_fAvoidObjectsDetectionHeight
float SCR_ObstacleDetector.m_fAvoidObjectsDetectionHeight |
|
protected |
◆ m_fAvoidObjectsDetectionRadius
float SCR_ObstacleDetector.m_fAvoidObjectsDetectionRadius |
|
protected |
◆ m_fOceanLevel
float SCR_ObstacleDetector.m_fOceanLevel |
|
protected |
The documentation for this interface was generated from the following file:
- Game/Generators/Common/SCR_ObstacleDetector.c