命名空间 | |
| namespace | detail |
类 | |
| struct | RoadBakeOptions |
| Options for baking a road network into mesh + navigation overlays. 更多... | |
| struct | RoadBakeResult |
| Owning bake result: mesh, overlays and generic decoration placement points. 更多... | |
| struct | RoadControlPoint |
| One authored control point on a road centerline (world space, Y-up). 更多... | |
| struct | RoadEdge |
| Directed centerline edge with optional reverse lanes. 更多... | |
| struct | RoadEdgeSplitResult |
| Stable identities produced by one atomic edge split. 更多... | |
| struct | RoadLaneConnection |
| One legal lane-to-lane connection inside a junction. 更多... | |
| class | RoadNetwork |
| Owning directed road graph with lane connectivity. 更多... | |
| struct | RoadNode |
| Junction node owned by a road network. 更多... | |
| struct | RoadOverlay |
| Owning bake-time overlay snapshot (no pointers into the network). 更多... | |
| struct | RoadPolyline |
| One renderer-neutral polyline chunk for navigation / marking overlays. 更多... | |
| struct | RoadProfile |
| Owning open profile polyline for one edge style and lane layout. 更多... | |
| struct | RoadProfilePoint |
| One 2D profile sample in the edge local (side, up) plane. 更多... | |
| struct | RoadStyle |
| Cross-section and structural style for one road edge. 更多... | |
| struct | RoadTerrainConformOptions |
| World/grid mapping and bounded blending settings for road-to-terrain conformance. 更多... | |
| struct | RoadTerrainConformReceipt |
| Exact changed samples needed to safely restore one road terrain conformance. @cost Storage, copy and move-destruction work are linear in the number of changed samples. 更多... | |
枚举 | |
| enum class | RoadJunctionControl : std::uint8_t { Uncontrolled = 0 , Yield , Stop , Signal } |
| Authoritative traffic-control policy applied to every approach of one junction node. 更多... | |
| enum class | RoadLaneDirection : std::uint8_t { Forward = 0 , Backward } |
| Travel direction of a lane relative to the authored edge centerline. 更多... | |
| enum class | RoadMaterial : std::uint8_t { Asphalt = 0 , Curb , Sidewalk , Deck , Pier , Marking , MarkingYellow , Nav } |
| Profile material tags used when lofting a road cross-section. 更多... | |
函数 | |
| Result< RoadBakeResult > | bakeRoadNetwork (const RoadNetwork &network, const RoadBakeOptions &options={}) |
| Bake every edge, junction platform, pier, marking and navigation overlay. | |
| EVENGINE_API_DOMAINS Result< int > | conformHeightmapToRoad (Heightmap &terrain, const MeshBuild &roadMesh, const RoadTerrainConformOptions &options={}) |
| Atomically conform a heightmap to nearby baked road surface triangles. | |
| EVENGINE_API_DOMAINS Result< RoadTerrainConformReceipt > | conformHeightmapToRoadWithReceipt (Heightmap &terrain, const MeshBuild &roadMesh, const RoadTerrainConformOptions &options={}) |
| Atomically conform terrain and return the exact reversible sample delta. | |
| EVENGINE_API_DOMAINS Result< int > | restoreHeightmapFromRoad (Heightmap &terrain, const RoadTerrainConformReceipt &receipt) |
| Atomically restore a conformance receipt if none of its samples became stale. | |
| int | mapLaneByLateralRank (int inLane, int inLaneCount, int outLaneCount) |
| bool | validJunctionControl (RoadJunctionControl control) |
| const char * | roadMaterialGroup (RoadMaterial material) noexcept |
| Map a material tag to the MeshBuild group name used by the baker. @ownership borrowed — returns a pointer to a static string literal; callers must not free it. @lifetime Program lifetime; the pointer remains valid for the process. | |
| Result< RoadProfile > | makeRoadProfile (const RoadStyle &style, int lanesForward, int lanesBackward) |
| Build a mathematical road cross-section for the given lane counts. | |
| Result< RoadBakeResult > | bakeRoadNetworkRecipe (const Params ¶ms) |
| Build the shared road recipe once for mesh, navigation and artifact projections. | |
| bool | generateRoadNetworkMesh (const Params ¶ms, MeshBuild &out, std::string &error) |
| Generate a multi-level interchange mesh from Params (span/height/lanes/seed). | |
| Result< RoadOverlay > | generateRoadNetworkOverlay (const Params ¶ms) |
| Bake navigation overlay for the same Params used by mesh.roadNetwork. | |
| std::unique_ptr< image::ImageData > | generateRoadMarkingsTexture (const Params ¶ms, std::string &error) |
| Pure-function road marking atlas (asphalt + edge + dashed center + zebra). | |
| void | registerRoadMeshRecipes (MeshRecipeRegistry ®istry) |
| Registers road mesh recipes. | |
| void | registerRoadTextureRecipes (TextureRecipeRegistry ®istry) |
| Registers road texture recipes. | |
枚举类型说明
◆ RoadJunctionControl
|
strong |
Authoritative traffic-control policy applied to every approach of one junction node.
在文件 RoadTypes.h 第 43 行定义.
◆ RoadLaneDirection
|
strong |
Travel direction of a lane relative to the authored edge centerline.
| 枚举值 | |
|---|---|
| Forward | Travels from RoadEdge::from to RoadEdge::to. |
| Backward | Travels from RoadEdge::to to RoadEdge::from. |
在文件 RoadTypes.h 第 79 行定义.
◆ RoadMaterial
|
strong |
Profile material tags used when lofting a road cross-section.
| 枚举值 | |
|---|---|
| Asphalt | |
| Curb | |
| Sidewalk | |
| Deck | |
| Pier | |
| Marking | |
| MarkingYellow | |
| Nav | |
在文件 RoadTypes.h 第 122 行定义.
函数说明
◆ bakeRoadNetwork()
| EVENGINE_API_DOMAINS Result< RoadBakeResult > eve::procgen::road::bakeRoadNetwork | ( | const RoadNetwork & | network, |
| const RoadBakeOptions & | options = {} |
||
| ) |
Bake every edge, junction platform, pier, marking and navigation overlay.
- 参数
-
network Borrowed live network; must outlive the call only. options Bake knobs; sample counts are bounded to [2,4096], and enabled navigation dimensions must be finite and positive.
- 返回
- Owning mesh/overlay snapshot, or a structured diagnostic. @cost Linear in generated geometry and bounded by
maximumMeshElementsplusmaximumPlacements.
- 注解
- Synchronous, owner-thread-only; result retains no pointers into network.
在文件 RoadBake.cpp 第 1899 行定义.
引用了 edge, eve::procgen::road::RoadNetwork::edgeCount(), eve::procgen::road::RoadNetwork::edges(), end, eve::Result< T >::failure(), found, from, eve::procgen::road::RoadEdge::from, eve::procgen::MeshBuild::getVertexCount(), eve::procgen::road::RoadNode::id, eve::InvalidArgument, eve::InvariantViolation, eve::procgen::road::RoadNetwork::laneLinkCount(), eve::procgen::road::RoadEdge::lanesBackward, eve::procgen::road::RoadEdge::lanesForward, eve::procgen::road::RoadBakeResult::mesh, node, eve::procgen::road::RoadNetwork::nodeCount(), eve::procgen::road::RoadNetwork::nodeResult(), eve::procgen::road::RoadNetwork::nodes(), options, eve::procgen::road::RoadBakeResult::overlay, eve::procgen::road::RoadBakeResult::placements, eve::PreconditionViolation, eve::procgen::MeshBuild::setMeta(), spline, start, eve::Result< T >::success(), to, eve::procgen::road::RoadEdge::to, topology, turns, u , 以及 eve::procgen::road::RoadNetwork::validate().
被这些函数引用 bakeRoadNetworkRecipe().
◆ bakeRoadNetworkRecipe()
| Result< RoadBakeResult > eve::procgen::road::bakeRoadNetworkRecipe | ( | const Params & | params | ) |
Build the shared road recipe once for mesh, navigation and artifact projections.
- 参数
-
params Deterministic scene and bake parameters.
- 返回
- Owning bake products, or a structured validation/generation error. @cost Linear in sampled road geometry and enabled overlays; reuse the returned products for multiple projections.
在文件 RoadRecipes.cpp 第 38 行定义.
引用了 bakeRoadNetwork(), eve::Result< T >::failure() , 以及 params.
被这些函数引用 eve::procgen::generateRoadNetworkArtifact(), generateRoadNetworkMesh() , 以及 generateRoadNetworkOverlay().
◆ conformHeightmapToRoad()
| Result< int > eve::procgen::road::conformHeightmapToRoad | ( | Heightmap & | terrain, |
| const MeshBuild & | roadMesh, | ||
| const RoadTerrainConformOptions & | options = {} |
||
| ) |
Atomically conform a heightmap to nearby baked road surface triangles.
- 参数
-
terrain Mutable normalized heightmap; unchanged on failure. roadMesh Immutable baked road mesh. options World/grid mapping, blend width, bridge/tunnel rejection threshold and work budget.
- 返回
- Number of changed samples or a structured validation/budget diagnostic. @cost Linear in road triangle coverage plus covered cells times the blend-radius area; bounded by maximumWork. @thread Synchronous and caller-thread-only; no callbacks are invoked.
在文件 RoadTerrain.cpp 第 166 行定义.
引用了 conformHeightmapToRoadWithReceipt(), eve::Result< T >::failure(), options, eve::Result< T >::success() , 以及 terrain.
◆ conformHeightmapToRoadWithReceipt()
| Result< RoadTerrainConformReceipt > eve::procgen::road::conformHeightmapToRoadWithReceipt | ( | Heightmap & | terrain, |
| const MeshBuild & | roadMesh, | ||
| const RoadTerrainConformOptions & | options = {} |
||
| ) |
Atomically conform terrain and return the exact reversible sample delta.
- 参数
-
terrain Mutable normalized heightmap; unchanged on failure. roadMesh Immutable baked road mesh. options World/grid mapping, blend width, bridge/tunnel rejection threshold and work budget.
- 返回
- Owning receipt containing row-major changed indices and before/after values. @cost Same as conformHeightmapToRoad, plus storage linear in changed samples.
在文件 RoadTerrain.cpp 第 24 行定义.
引用了 eve::procgen::road::RoadTerrainConformReceipt::after, ax, ay, az, eve::procgen::road::RoadTerrainConformReceipt::before, bx, by, bz, covered, cx, cy, distance, dx, dz, eve::procgen::MeshBuild::getGroupName(), eve::procgen::MeshBuild::getIndex(), eve::procgen::MeshBuild::getIndexCount(), eve::procgen::MeshBuild::getPositionX(), eve::procgen::MeshBuild::getPositionY(), eve::procgen::MeshBuild::getPositionZ(), eve::procgen::MeshBuild::getTriangleGroup(), eve::procgen::MeshBuild::getVertexCount(), group, height, eve::procgen::road::RoadTerrainConformReceipt::height, index, eve::InvalidArgument, eve::InvariantViolation, options, eve::PreconditionViolation, eve::procgen::road::RoadTerrainConformReceipt::sampleIndices, eve::procgen::Heightmap::setHeight(), eve::procgen::road::RoadTerrainConformReceipt::skippedBridgeSamples, eve::procgen::road::RoadTerrainConformReceipt::skippedTunnelSamples, sourceX, eve::Result< T >::success(), target, terrain, triangle, u, weight, weights, width, eve::procgen::road::RoadTerrainConformReceipt::width, x , 以及 z.
被这些函数引用 conformHeightmapToRoad().
◆ generateRoadMarkingsTexture()
| std::unique_ptr< image::ImageData > eve::procgen::road::generateRoadMarkingsTexture | ( | const Params & | params, |
| std::string & | error | ||
| ) |
◆ generateRoadNetworkMesh()
| bool eve::procgen::road::generateRoadNetworkMesh | ( | const Params & | params, |
| MeshBuild & | out, | ||
| std::string & | error | ||
| ) |
Generate a multi-level interchange mesh from Params (span/height/lanes/seed).
在文件 RoadRecipes.cpp 第 44 行定义.
引用了 bakeRoadNetworkRecipe(), error , 以及 params.
被这些函数引用 registerRoadMeshRecipes().
◆ generateRoadNetworkOverlay()
| Result< RoadOverlay > eve::procgen::road::generateRoadNetworkOverlay | ( | const Params & | params | ) |
Bake navigation overlay for the same Params used by mesh.roadNetwork.
在文件 RoadRecipes.cpp 第 54 行定义.
引用了 bakeRoadNetworkRecipe(), eve::Result< T >::failure(), params , 以及 eve::Result< T >::success().
◆ makeRoadProfile()
| EVENGINE_API_DOMAINS Result< RoadProfile > eve::procgen::road::makeRoadProfile | ( | const RoadStyle & | style, |
| int | lanesForward, | ||
| int | lanesBackward | ||
| ) |
Build a mathematical road cross-section for the given lane counts.
- 参数
-
style Geometric style; widths must be finite and non-negative. lanesForward Forward driving lanes (>= 0). lanesBackward Optional opposite lanes (>= 0).
- 注解
- At least one direction must contain a lane.
- 返回
- Owning profile, or a structured validation diagnostic.
在文件 RoadProfile.cpp 第 50 行定义.
引用了 Asphalt, Curb, eve::procgen::road::RoadStyle::curbHeight, eve::procgen::road::RoadStyle::curbWidth, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::road::RoadProfile::halfWidth, eve::InvalidArgument, eve::procgen::road::RoadStyle::laneWidth, ok, Sidewalk, eve::procgen::road::RoadStyle::sidewalkHeight, eve::procgen::road::RoadStyle::sidewalkWidth , 以及 eve::Result< T >::success().
被这些函数引用 eve::procgen::road::RoadNetwork::addEdge(), eve::procgen::road::detail::bakeTrafficControlPoints(), eve::procgen::road::RoadNetwork::restoreEdge(), eve::procgen::road::RoadNetwork::setEdgeLaneCounts() , 以及 eve::procgen::road::RoadNetwork::setEdgeStyle().
◆ mapLaneByLateralRank()
| int eve::procgen::road::mapLaneByLateralRank | ( | int | inLane, |
| int | inLaneCount, | ||
| int | outLaneCount | ||
| ) |
在文件 RoadNetwork.cpp 第 199 行定义.
◆ registerRoadMeshRecipes()
| void eve::procgen::road::registerRoadMeshRecipes | ( | MeshRecipeRegistry & | registry | ) |
Registers road mesh recipes.
在文件 RoadRecipes.cpp 第 115 行定义.
引用了 eve::procgen::ParamDescriptor::boolean(), eve::procgen::ParamDescriptor::choice(), eve::procgen::ParamDescriptor::floating(), generateRoadNetworkMesh(), eve::procgen::ParamDescriptor::integer(), eve::procgen::RecipeDescriptor::params , 以及 eve::procgen::MeshRecipeRegistry::registerRecipe().
◆ registerRoadTextureRecipes()
| void eve::procgen::road::registerRoadTextureRecipes | ( | TextureRecipeRegistry & | registry | ) |
Registers road texture recipes.
在文件 RoadRecipes.cpp 第 146 行定义.
引用了 eve::procgen::ParamDescriptor::boolean(), eve::procgen::ParamDescriptor::floating(), generateRoadMarkingsTexture(), eve::procgen::RecipeDescriptor::grid(), eve::procgen::RecipeDescriptor::params , 以及 eve::procgen::TextureRecipeRegistry::registerRecipe().
被这些函数引用 eve::procgen::TextureRecipeRegistry::registerBuiltins().
◆ restoreHeightmapFromRoad()
| Result< int > eve::procgen::road::restoreHeightmapFromRoad | ( | Heightmap & | terrain, |
| const RoadTerrainConformReceipt & | receipt | ||
| ) |
Atomically restore a conformance receipt if none of its samples became stale.
- 参数
-
terrain Mutable heightmap that must still contain every receipt after-value. receipt Owning receipt returned by conformHeightmapToRoadWithReceipt.
- 返回
- Number of restored samples, or a structured stale/validation diagnostic. @cost Linear in receipt sample count.
在文件 RoadTerrain.cpp 第 173 行定义.
引用了 eve::procgen::road::RoadTerrainConformReceipt::after, eve::procgen::road::RoadTerrainConformReceipt::before, eve::Conflict, eve::procgen::road::RoadTerrainConformReceipt::height, index, eve::InvalidArgument, previous, eve::procgen::road::RoadTerrainConformReceipt::sampleIndices, eve::procgen::Heightmap::setHeight(), eve::Result< T >::success(), terrain, eve::procgen::road::RoadTerrainConformReceipt::width, x , 以及 z.
◆ roadMaterialGroup()
|
noexcept |
Map a material tag to the MeshBuild group name used by the baker. @ownership borrowed — returns a pointer to a static string literal; callers must not free it. @lifetime Program lifetime; the pointer remains valid for the process.
在文件 RoadProfile.cpp 第 36 行定义.
引用了 Asphalt, Curb, Deck, Marking, MarkingYellow, material, Nav, Pier , 以及 Sidewalk.
◆ validJunctionControl()
| bool eve::procgen::road::validJunctionControl | ( | RoadJunctionControl | control | ) |