|
CARLA
|
The authoritative "what is road surface, where, at what height" tool the rest of generation consumes. More...
#include <OpenDriveGenerator.h>
Classes | |
| struct | FCell |
Public Member Functions | |
| void | BuildDistanceFields () |
| Two-pass chamfer distance transform filling DistToDrive/DistToPaved and NearestPavedMinZ. | |
| const FCell * | CellAtWorld (float X, float Y) const |
| void | Initialize (const FBox &Bounds, float InCellSize) |
| bool | IsValid () const |
| void | RasterizeTriangle (const FVector &A, const FVector &B, const FVector &C, bool bIsDrive) |
| Splats one triangle of road ("drive") or sidewalk surface into the grid: conservative 2D rasterization, per-cell-center barycentric z. | |
Public Attributes | |
| TArray< FCell > | Cells |
| float | CellSize = 250.0f |
| int32 | Height = 0 |
| float | OriginX = 0.0f |
| float | OriginY = 0.0f |
| int32 | Width = 0 |
The authoritative "what is road surface, where, at what height" tool the rest of generation consumes.
GenerateRoadMesh rasterizes every road/sidewalk triangle (vertices alone leave unconstrained holes inside lanes – the mesh is dense along s but a full lane wide laterally) into a regular XY grid with barycentric-interpolated surface heights, then a chamfer distance transform gives every cell its distance to the driving footprint and to any pavement, plus the height of the nearest pavement. Terrain generation, furniture placement and the generation QA all query this one structure instead of re-deriving geometry their own (subtly different) ways.
Definition at line 166 of file OpenDriveGenerator.h.
| void AOpenDriveGenerator::FRoadSurfaceRaster::BuildDistanceFields | ( | ) |
Two-pass chamfer distance transform filling DistToDrive/DistToPaved and NearestPavedMinZ.
Call once after all triangles are in.
Definition at line 375 of file OpenDriveGenerator.cpp.
References AOpenDriveGenerator::FRoadSurfaceRaster::FCell::bDrive, AOpenDriveGenerator::FRoadSurfaceRaster::FCell::bPaved, AOpenDriveGenerator::FRoadSurfaceRaster::FCell::DistToDrive, AOpenDriveGenerator::FRoadSurfaceRaster::FCell::DistToPaved, and AOpenDriveGenerator::FRoadSurfaceRaster::FCell::NearestPavedMinZ.
Referenced by AOpenDriveGenerator::GenerateRoadMesh().
| const AOpenDriveGenerator::FRoadSurfaceRaster::FCell * AOpenDriveGenerator::FRoadSurfaceRaster::CellAtWorld | ( | float | X, |
| float | Y | ||
| ) | const |
Definition at line 483 of file OpenDriveGenerator.cpp.
References IsValid().
Referenced by AOpenDriveGenerator::GenerateFurnitureAnchors(), AOpenDriveGenerator::GenerateGroundPlane(), and AOpenDriveGenerator::RunGenerationQA().
| void AOpenDriveGenerator::FRoadSurfaceRaster::Initialize | ( | const FBox & | Bounds, |
| float | InCellSize | ||
| ) |
Definition at line 288 of file OpenDriveGenerator.cpp.
References Cells, CellSize, Height, OriginX, OriginY, and Width.
Referenced by AOpenDriveGenerator::GenerateRoadMesh().
|
inline |
Definition at line 198 of file OpenDriveGenerator.h.
Referenced by AOpenDriveGenerator::DumpRasterAt(), AOpenDriveGenerator::GenerateGroundPlane(), AOpenDriveGenerator::GenerateMedianFill(), and AOpenDriveGenerator::RunGenerationQA().
| void AOpenDriveGenerator::FRoadSurfaceRaster::RasterizeTriangle | ( | const FVector & | A, |
| const FVector & | B, | ||
| const FVector & | C, | ||
| bool | bIsDrive | ||
| ) |
Splats one triangle of road ("drive") or sidewalk surface into the grid: conservative 2D rasterization, per-cell-center barycentric z.
Definition at line 299 of file OpenDriveGenerator.cpp.
References AOpenDriveGenerator::FRoadSurfaceRaster::FCell::bDrive, AOpenDriveGenerator::FRoadSurfaceRaster::FCell::bDriveCovered, AOpenDriveGenerator::FRoadSurfaceRaster::FCell::bPaved, AOpenDriveGenerator::FRoadSurfaceRaster::FCell::DriveMaxZ, AOpenDriveGenerator::FRoadSurfaceRaster::FCell::DriveMinZ, and AOpenDriveGenerator::FRoadSurfaceRaster::FCell::PavedMinZ.
Referenced by AOpenDriveGenerator::GenerateRoadMesh().
| TArray<FCell> AOpenDriveGenerator::FRoadSurfaceRaster::Cells |
Definition at line 196 of file OpenDriveGenerator.h.
Referenced by AOpenDriveGenerator::DumpRasterAt(), AOpenDriveGenerator::GenerateGroundPlane(), AOpenDriveGenerator::GenerateMedianFill(), Initialize(), and AOpenDriveGenerator::RunGenerationQA().
| float AOpenDriveGenerator::FRoadSurfaceRaster::CellSize = 250.0f |
Definition at line 191 of file OpenDriveGenerator.h.
Referenced by AOpenDriveGenerator::DumpRasterAt(), AOpenDriveGenerator::GenerateGroundPlane(), AOpenDriveGenerator::GenerateMedianFill(), Initialize(), and AOpenDriveGenerator::RunGenerationQA().
| int32 AOpenDriveGenerator::FRoadSurfaceRaster::Height = 0 |
Definition at line 195 of file OpenDriveGenerator.h.
Referenced by AOpenDriveGenerator::DumpRasterAt(), AOpenDriveGenerator::GenerateGroundPlane(), AOpenDriveGenerator::GenerateMedianFill(), Initialize(), and AOpenDriveGenerator::RunGenerationQA().
| float AOpenDriveGenerator::FRoadSurfaceRaster::OriginX = 0.0f |
Definition at line 192 of file OpenDriveGenerator.h.
Referenced by AOpenDriveGenerator::DumpRasterAt(), AOpenDriveGenerator::GenerateGroundPlane(), Initialize(), and AOpenDriveGenerator::RunGenerationQA().
| float AOpenDriveGenerator::FRoadSurfaceRaster::OriginY = 0.0f |
Definition at line 193 of file OpenDriveGenerator.h.
Referenced by AOpenDriveGenerator::DumpRasterAt(), AOpenDriveGenerator::GenerateGroundPlane(), Initialize(), and AOpenDriveGenerator::RunGenerationQA().
| int32 AOpenDriveGenerator::FRoadSurfaceRaster::Width = 0 |
Definition at line 194 of file OpenDriveGenerator.h.
Referenced by AOpenDriveGenerator::DumpRasterAt(), AOpenDriveGenerator::GenerateGroundPlane(), AOpenDriveGenerator::GenerateMedianFill(), Initialize(), and AOpenDriveGenerator::RunGenerationQA().