载入中...
搜索中...
未找到
RoadProfile.cpp
浏览该文件的文档.
55Result<RoadProfile> makeRoadProfile(const RoadStyle& style, int lanesForward, int lanesBackward) {
60 Diagnostic::error(DiagnosticCode::InvalidArgument, "lanesForward must be in [0,8]", "lanesForward"));
63 Diagnostic::error(DiagnosticCode::InvalidArgument, "lanesBackward must be in [0,8]", "lanesBackward"));
68 const float asphaltHalf = 0.5f * style.laneWidth * static_cast<float>(lanesForward + lanesBackward);
90 if (coverage.empty() || coverage.front().first > -asphaltHalf + 1e-4f || covered < asphaltHalf - 1e-4f)
Stable, structured diagnostics shared by engine modules.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Result< void > validateRoadAuthoring(const RoadStyle &style)
Validate structural intervals and continuous-facility authoring.
Definition RoadAuthoring.cpp:109
Definition TerrainWorldWorkspace.h:12
Result< RoadProfile > makeRoadProfile(const RoadStyle &style, int lanesForward, int lanesBackward)
Build a mathematical road cross-section for the given lane counts.
Definition RoadProfile.cpp:55
const char * roadMaterialGroup(RoadMaterial material) noexcept
Map a material tag to the MeshBuild group name used by the baker. @ownership borrowed — returns a poi...
Definition RoadProfile.cpp:37
@ MarkingYellow
@ TunnelPortalAsphalt
Driving surface inside an authored tunnel portal footprint.
@ TunnelAsphalt
@ BridgeAsphalt
@ InvalidArgument
Owning open profile polyline for one edge style and lane layout.
Definition RoadTypes.h:347
std::vector< RoadProfilePoint > points
Definition RoadTypes.h:348
Owning cross-section, width policy and structural authoring for one road edge.
Definition RoadTypes.h:182
std::vector< RoadProfilePoint > crossSection
Empty selects the standard road; custom segment tags are explicit.
Definition RoadTypes.h:192