Add road edge kind labeling and utilities
This commit is contained in:
@@ -241,6 +241,10 @@ import {
|
||||
getScenePathLabel,
|
||||
getScenePathPointIndex,
|
||||
getScenePaths,
|
||||
normalizeScenePathRoadEdgeHeight,
|
||||
normalizeScenePathRoadEdgeKind,
|
||||
normalizeScenePathRoadEdgeMaterialId,
|
||||
normalizeScenePathRoadEdgeWidth,
|
||||
normalizeScenePathRoadFalloff,
|
||||
normalizeScenePathRoadHeightOffset,
|
||||
normalizeScenePathRoadShoulderWidth,
|
||||
@@ -251,6 +255,8 @@ import {
|
||||
normalizeScenePathRoadMaterialId,
|
||||
type ScenePath,
|
||||
type ScenePathCurveMode,
|
||||
type ScenePathRoadEdgeKind,
|
||||
type ScenePathRoadEdgeSide,
|
||||
type ScenePathPoint
|
||||
} from "../document/paths";
|
||||
import {
|
||||
@@ -1502,6 +1508,19 @@ function getPathLabelById(pathId: string, paths: ScenePath[]): string {
|
||||
: getScenePathLabel(paths[pathIndex], pathIndex);
|
||||
}
|
||||
|
||||
function getRoadEdgeKindLabel(kind: ScenePathRoadEdgeKind): string {
|
||||
switch (kind) {
|
||||
case "curb":
|
||||
return "Curb";
|
||||
case "softShoulder":
|
||||
return "Soft shoulder";
|
||||
case "bank":
|
||||
return "Bank";
|
||||
case "ditch":
|
||||
return "Ditch";
|
||||
}
|
||||
}
|
||||
|
||||
function getTerrainLabel(terrain: Terrain, index: number): string {
|
||||
return terrain.name ?? `Terrain ${index + 1}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user