载入中...
搜索中...
未找到
RoadBakeEdges.cpp
浏览该文件的文档.
20Result<void> bakeEdgeGeometry(MeshBuild& mesh, RoadOverlay& overlay, const RoadNetwork& network, const RoadEdge& edge,
116 auto lofted = bakeStructuralGeometry(mesh, trimmed, edge, profile.value(), pathLength.value(), options);
133 if (trimEnd <= 0.05f && terminalNodes.contains(toNode.value().id) && toNode.value().connection.ports.empty()) {
146 bakeContinuousFacilities(mesh, trimmed, network, edge, pathLength.value(), options, activeJunctionNodes);
156 laneCenterOffset(edge.style, edge.lanesForward, edge.lanesBackward, lane, RoadLaneDirection::Forward);
206 laneCenterOffset(edge.style, edge.lanesForward, edge.lanesBackward, lane, RoadLaneDirection::Backward);
Stable, structured diagnostics shared by engine modules.
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
CPU triangle mesh from procedural mesh recipes (e.g. marching cubes). Positions/normals are xyz-packe...
Definition MeshBuild.h:20
Owning directed road graph with lane connectivity.
Definition RoadNetwork.h:19
Result< RoadNode > nodeResult(std::uint32_t id) const
Return an owning node snapshot. @cost Copies the node-owned custom mesh and port sections; authoring ...
Definition RoadNetwork.cpp:890
Result< void > bakeStructuralGeometry(MeshBuild &mesh, const std::vector< SplineFrameSample > &frames, const RoadEdge &edge, const RoadProfile &profile, float pathLength, const RoadBakeOptions &options)
Module-private road bake implementation helper.
Definition RoadBakeStructures.cpp:58
float laneCenterOffset(const RoadStyle &style, int lanesForward, int lanesBackward, int laneIndex, RoadLaneDirection direction)
Module-private road bake implementation helper.
Definition RoadBake.cpp:393
Result< void > capProfileRing(MeshBuild &mesh, const SplineFrameSample &frame, const RoadProfile &profile, bool outward)
Module-private road bake implementation helper.
Definition RoadBakeProfiles.cpp:123
void capProfileShoulders(MeshBuild &mesh, const SplineFrameSample &frame, const RoadProfile &profile, bool outward)
Module-private road bake implementation helper.
Definition RoadBakeProfiles.cpp:180
float roadSurfaceHeight(const RoadStyle &style, float lateral)
Return custom asphalt height at one unscaled driving lateral position.
Definition RoadAuthoring.cpp:253
void appendStripQuad(MeshBuild &mesh, V3 a, V3 b, V3 c, V3 d, V3 normal, float u0, float u1, float v0, float v1, RoadMaterial material, QuadDiagonal diagonal)
Emit a bounded strip quad with the selected physical diagonal and unchanged vertex attributes.
Definition RoadBake.cpp:425
Result< SplinePath > edgeToSpline(const RoadEdge &edge)
Module-private road bake implementation helper.
Definition RoadBake.cpp:62
void blendFrameToJunctionPlane(SplineFrameSample &frame, const JunctionPlane &plane, float weight)
Module-private road bake implementation helper.
Definition RoadBake.cpp:298
float junctionSocketDistance(const RoadNetwork &network, const RoadNode &node, const RoadEdge &edge, float pathLength)
Module-private road bake implementation helper.
Definition RoadBake.cpp:146
Result< void > addLaneMarkings(MeshBuild &mesh, const std::vector< SplineFrameSample > &frames, const RoadEdge &edge, float pathLength, const RoadBakeOptions &options)
Module-private road bake implementation helper.
Definition RoadBake.cpp:539
JunctionPlane fitJunctionPlane(const RoadNetwork &network, const RoadNode &node)
Module-private road bake implementation helper.
Definition RoadBake.cpp:197
Result< void > bakeEdgeGeometry(MeshBuild &mesh, RoadOverlay &overlay, const RoadNetwork &network, const RoadEdge &edge, const RoadBakeOptions &options, const std::unordered_set< std::uint32_t > &activeJunctionNodes, const std::unordered_set< std::uint32_t > &terminalNodes, RoadFrameCache &frameCache)
Bake one edge.
Definition RoadBakeEdges.cpp:20
Result< void > bakeContinuousFacilities(MeshBuild &mesh, const std::vector< SplineFrameSample > &frames, const RoadNetwork &network, const RoadEdge &edge, float pathLength, const RoadBakeOptions &options, const std::unordered_set< std::uint32_t > &activeNodes)
Sweep continuous facilities and clip them to exact interval/socket boundaries.
Definition RoadBakeStructures.cpp:138
ResultRef< const std::vector< SplineFrameSample > > prepareRoadFrames(RoadFrameCache &cache, const SplinePath &path, const RoadEdge &edge, const RoadBakeOptions &options, float length)
Prepare once per immutable edge/options snapshot. Borrowed result expires with cache destruction....
Definition RoadSampling.cpp:80
void appendArrow(MeshBuild &mesh, V3 pos, V3 forward, V3 up, float size)
Module-private road bake implementation helper.
Definition RoadBake.cpp:652
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
@ SurfaceSegments
@ Backward
Travels from RoadEdge::to to RoadEdge::from.
@ NotFound
Options for baking a road network into mesh + navigation overlays.
Definition RoadBake.h:50
Directed centerline edge with optional reverse lanes.
Definition RoadTypes.h:286
Owning bake-time overlay snapshot (no pointers into the network).
Definition RoadTypes.h:341
One renderer-neutral polyline chunk for navigation / marking overlays.
Definition RoadTypes.h:325
RoadLaneDirection outDirection
Definition RoadTypes.h:335
RoadLaneDirection inDirection
Definition RoadTypes.h:334
std::unordered_map< std::uint32_t, RoadSurfaceRows > surfaces
Definition RoadBakeInternal.h:22
One bake's sole owner of retained road frames and shared scan work; no callbacks or cross-bake reuse.
Definition RoadBakeInternal.h:15
std::vector< SplineFrameSample > frames
Full metric path with actual clipped/blended rows in its visible interval.
Definition RoadBakeInternal.h:17
std::size_t firstVisible
Definition RoadBakeInternal.h:18
std::size_t lastVisible
Definition RoadBakeInternal.h:18