载入中...
搜索中...
未找到
eve::procgen::road::RoadNetwork类 参考

Owning directed road graph with lane connectivity. 更多...

#include <RoadNetwork.h>

Public 成员函数

Result< std::uint32_t > addNode (float x, float y, float z, float junctionRadius=6.f)
 Insert a junction node after validating finite coordinates.
 
Result< void > restoreNode (RoadNode node)
 Restore a node with an explicit stable id for undo/import paths.
 
Result< void > setNodeConnection (std::uint32_t nodeId, RoadConnection connection)
 Atomically attach or clear an owning custom connection mesh and its port bindings.
 
Result< std::uint32_t > addEdge (std::uint32_t from, std::uint32_t to, std::vector< RoadControlPoint > controlPoints, int lanesForward=2, int lanesBackward=0, RoadStyle style={})
 Insert a non-degenerate directed edge between two distinct live nodes.
 
Result< void > restoreEdge (RoadEdge edge)
 Restore an edge with an explicit stable id for undo/import paths.
 
Result< void > addLaneLink (RoadLaneConnection link)
 Register one legal turn inside a shared junction node.
 
Result< void > removeLaneLink (const RoadLaneConnection &link)
 Remove one exact lane-to-lane connection.
 
Result< bool > blockLaneLink (RoadLaneConnection link)
 Persistently forbid one exact legal lane connection and remove it if currently active.
 
Result< void > unblockLaneLink (const RoadLaneConnection &link)
 Remove one exact persistent lane-link prohibition.
 
Result< int > connectAllTurns (std::uint32_t nodeId)
 Auto-connect all forward and backward lane ports at one node.
 
Result< void > validate () const
 Validate graph, endpoint and lane-link invariants without mutation.
 
Result< void > setNodePosition (std::uint32_t nodeId, float x, float y, float z)
 Move a node and atomically re-anchor every incident edge endpoint.
 
Result< void > setNodeJunctionRadius (std::uint32_t nodeId, float junctionRadius)
 Replace one node's positive junction trim radius.
 
Result< void > setNodeJunctionControl (std::uint32_t nodeId, RoadJunctionControl control)
 Replace one node's authoritative traffic-control policy.
 
Result< int > mergeNodes (std::uint32_t keepNodeId, std::uint32_t removeNodeId, float maxDistance)
 Atomically merge one nearby endpoint node into another stable node.
 
Result< void > setEdgeControlPoints (std::uint32_t edgeId, std::vector< RoadControlPoint > controlPoints)
 Replace one edge spline while preserving its node-owned endpoint positions.
 
Result< int > setEdgeLaneCounts (std::uint32_t edgeId, int lanesForward, int lanesBackward)
 Atomically replace directional lane counts and remove links that become out of range.
 
Result< void > reverseEdge (std::uint32_t edgeId)
 Atomically reverse one edge while preserving its physical lanes, links, and side-object intervals.
 
Result< int > reconnectEdgeEndpoint (std::uint32_t edgeId, bool fromEndpoint, std::uint32_t nodeId)
 Reconnect one edge endpoint to an existing node and prune connections left at the old junction.
 
Result< std::uint32_t > detachEdgeEndpoint (std::uint32_t edgeId, bool fromEndpoint)
 Detach one edge endpoint onto a new coincident stable node.
 
Result< std::uint32_t > detachEdgeEndpoint (std::uint32_t edgeId, bool fromEndpoint, std::uint32_t nodeId)
 Replay endpoint detachment using an editor-reserved node identity.
 
Result< RoadEdgeSplitResult > splitEdge (std::uint32_t edgeId, std::size_t controlPointIndex, float junctionRadius=6.f)
 Split an edge at one authored interior control point as a single topology mutation.
 
Result< RoadEdgeSplitResult > splitEdge (std::uint32_t edgeId, std::size_t controlPointIndex, float junctionRadius, std::uint32_t nodeId, std::uint32_t secondEdgeId)
 Split an edge while restoring identities reserved by an editor transaction.
 
Result< RoadEdgeSplitResult > splitEdgeAtPosition (std::uint32_t edgeId, RoadControlPoint position, float maxDistance, float junctionRadius=6.f)
 Project a world position onto the baked Catmull-Rom centerline and split at the nearest point.
 
Result< RoadEdgeSplitResult > splitEdgeAtPosition (std::uint32_t edgeId, RoadControlPoint position, float maxDistance, float junctionRadius, std::uint32_t nodeId, std::uint32_t secondEdgeId)
 Replay a position split using explicit editor-reserved identities.
 
Result< RoadEdgeSplitResult > splitEdgeAtSplineParameter (std::uint32_t edgeId, float parameter, float junctionRadius=6.f, std::uint32_t nodeId=0, std::uint32_t secondEdgeId=0)
 Split at a normalized parameter on the same Catmull-Rom centerline used by road baking.
 
Result< void > setEdgeStyle (std::uint32_t edgeId, RoadStyle style)
 Replace owning style/section/interval authoring atomically.
 
Result< void > removeEdge (std::uint32_t edgeId)
 Remove an edge and every lane link that references it.
 
Result< void > removeNode (std::uint32_t nodeId)
 Remove an isolated node.
 
void clear ()
 Clear every node, edge and link.
 
int nodeCount () const noexcept
 Node count.
 
int edgeCount () const noexcept
 Edge count.
 
int laneLinkCount () const noexcept
 Lane link count.
 
int blockedLaneLinkCount () const noexcept
 Return persistent exact turn prohibitions owned by this network.
 
std::uint64_t revision () const noexcept
 Revision.
 
Result< RoadNode > nodeResult (std::uint32_t id) const
 Return an owning node snapshot. @cost Copies the node-owned custom mesh and port sections; authoring queries only.
 
Result< RoadEdge > edgeResult (std::uint32_t id) const
 Return an owning edge snapshot. @cost Copies control points, custom sections and bounded interval/facility authoring.
 
const std::vector< RoadNode > & nodes () const noexcept
 Nodes.
 
const std::vector< RoadEdge > & edges () const noexcept
 Edges.
 
const std::vector< RoadLaneConnection > & laneLinks () const noexcept
 Lane links.
 
const std::vector< RoadLaneConnection > & blockedLaneLinks () const noexcept
 Borrow deterministic persistent turn prohibitions until the next network mutation.
 

静态 Public 成员函数

static Result< RoadNetwork > makeInterchange (float span=48.f, float bridgeHeight=8.f, int lanes=2, std::uint32_t seed=1)
 Build a multi-level interchange demo graph (ground cross + elevated loop + ramps).
 
static Result< RoadNetwork > makeStraight (float length=36.f, int lanes=2)
 Scene 1: single flat straight segment (no junction).
 
static Result< RoadNetwork > makeCurve (float radius=18.f, int lanes=2)
 Scene 2: gentle horizontal curve (no junction).
 
static Result< RoadNetwork > makeBridge (float length=36.f, float height=6.f, int lanes=2)
 Scene 3: elevated straight with piers.
 
static Result< RoadNetwork > makeCross (float span=32.f, int lanes=2)
 Scene 4: simple ground-level 4-way cross (one junction disc).
 
static Result< RoadNetwork > makeTee (float span=32.f, int lanes=2)
 Ground-level T-junction with an east-west through road and south stem.
 
static Result< RoadNetwork > makeY (float span=32.f, int lanes=2)
 Ground-level Y-junction with three arms separated by 120 degrees.
 
static Result< RoadNetwork > makeFan (float span, int lanes, std::vector< float > armAnglesDeg, std::vector< bool > intoHub={})
 Build a ground-level N-way fan from absolute arm angles in degrees.
 
static Result< RoadNetwork > makeFork (float span=32.f, int lanes=2)
 Three-way scene with a 60-degree acute fork.
 
static Result< RoadNetwork > makeSkew (float span=32.f, int lanes=2)
 Three-way scene with 135-degree skew corners.
 
static Result< RoadNetwork > makeRoundabout (float span=48.f, int lanes=1)
 Build a four-entry roundabout from ordinary nodes, curved edges and lane links.
 
static Result< RoadNetwork > makeScene (const std::string &scene, float span=36.f, float bridgeHeight=6.f, int lanes=2, std::uint32_t seed=1)
 Dispatch a named debug/demo scene.
 

详细描述

Owning directed road graph with lane connectivity.

Mutations are synchronous and owner-thread only. Revision bumps on every successful structural change. Handles/ids are stable until erase.

在文件 RoadNetwork.h 第 19 行定义.

成员函数说明

◆ addEdge()

Result< std::uint32_t > eve::procgen::road::RoadNetwork::addEdge ( std::uint32_t  from,
std::uint32_t  to,
std::vector< RoadControlPoint >  controlPoints,
int  lanesForward = 2,
int  lanesBackward = 0,
RoadStyle  style = {} 
)

Insert a non-degenerate directed edge between two distinct live nodes.

返回
Stable edge id or a structured diagnostic; failure leaves the network unchanged.

在文件 RoadNetwork.cpp 第 170 行定义.

引用了 edge, eve::Diagnostic::error(), eve::Result< T >::failure(), from, id, eve::procgen::road::RoadEdge::id, eve::InvalidArgument, eve::procgen::road::makeRoadProfile(), eve::NotFound, p, eve::PreconditionViolation, eve::Result< T >::success() , 以及 to.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::makeAddEdge(), makeBridge(), makeCross(), makeCurve(), makeFan(), makeInterchange(), makeRoundabout(), makeStraight() , 以及 makeTee().

◆ addLaneLink()

◆ addNode()

Result< std::uint32_t > eve::procgen::road::RoadNetwork::addNode ( float  x,
float  y,
float  z,
float  junctionRadius = 6.f 
)

◆ blockedLaneLinkCount()

int eve::procgen::road::RoadNetwork::blockedLaneLinkCount ( ) const
inlinenoexcept

Return persistent exact turn prohibitions owned by this network.

在文件 RoadNetwork.h 第 252 行定义.

◆ blockedLaneLinks()

◆ blockLaneLink()

Result< bool > eve::procgen::road::RoadNetwork::blockLaneLink ( RoadLaneConnection  link)

Persistently forbid one exact legal lane connection and remove it if currently active.

参数
linkExact directed lane route to suppress during automatic connection.
返回
Whether an active link was removed; failure leaves the network unchanged.

在文件 RoadNetwork.cpp 第 307 行定义.

引用了 active, eve::AlreadyExists, current, eve::Diagnostic::error(), eve::Result< T >::failure(), link, removed, eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), eve::procgen_editing::RoadNetworkEditTarget::loadSnapshot(), eve::procgen_editing::RoadNetworkEditTarget::makeBlockLaneLink() , 以及 eve::procgen::road::restoreRoadNetwork().

◆ clear()

void eve::procgen::road::RoadNetwork::clear ( )

Clear every node, edge and link.

在文件 RoadNetwork.cpp 第 878 行定义.

◆ connectAllTurns()

Result< int > eve::procgen::road::RoadNetwork::connectAllTurns ( std::uint32_t  nodeId)

Auto-connect all forward and backward lane ports at one node.

Immediate U-turns onto the same physical edge are omitted. Repeated calls are idempotent and return the number of newly-created links. Different lane counts preserve normalized lateral rank; an existing authored link overrides automatic mapping for the same incoming lane/outgoing route.

返回
Number of newly-created links; failure leaves the network unchanged.
注解
All links for the node commit atomically as one network revision. @cost Quadratic in incident edge count times lane count; intended for authoring and topology updates.

在文件 RoadNetwork.cpp 第 351 行定义.

引用了 eve::procgen::road::Backward, current, directions, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::road::Forward, link, eve::procgen::road::mapLaneByLateralRank(), nodeId, eve::NotFound, r, eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::makeConnectAllTurns(), makeCross(), makeFan(), makeInterchange(), makeRoundabout() , 以及 makeTee().

◆ detachEdgeEndpoint() [1/2]

Result< std::uint32_t > eve::procgen::road::RoadNetwork::detachEdgeEndpoint ( std::uint32_t  edgeId,
bool  fromEndpoint 
)

Detach one edge endpoint onto a new coincident stable node.

参数
edgeIdStable edge identity retained by the road.
fromEndpointTrue to detach from, false to detach to.
返回
New node identity, or a structured failure with no mutation.
注解
The selected endpoint must currently be shared by at least one other edge. @cost Linear in network lane-link count; intended for authoring operations.

在文件 RoadNetwork.cpp 第 790 行定义.

引用了 detachEdgeEndpoint().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), detachEdgeEndpoint() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeDetachEdgeEndpoint().

◆ detachEdgeEndpoint() [2/2]

Result< std::uint32_t > eve::procgen::road::RoadNetwork::detachEdgeEndpoint ( std::uint32_t  edgeId,
bool  fromEndpoint,
std::uint32_t  nodeId 
)

◆ edgeCount()

int eve::procgen::road::RoadNetwork::edgeCount ( ) const
inlinenoexcept

Edge count.

在文件 RoadNetwork.h 第 248 行定义.

被这些函数引用 eve::procgen::road::bakeRoadNetwork().

◆ edgeResult()

◆ edges()

◆ laneLinkCount()

int eve::procgen::road::RoadNetwork::laneLinkCount ( ) const
inlinenoexcept

Lane link count.

在文件 RoadNetwork.h 第 250 行定义.

被这些函数引用 eve::procgen::road::bakeRoadNetwork().

◆ laneLinks()

◆ makeBridge()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeBridge ( float  length = 36.f,
float  height = 6.f,
int  lanes = 2 
)
static

Scene 3: elevated straight with piers.

在文件 RoadNetworkRecipes.cpp 第 167 行定义.

引用了 a, addEdge(), addNode(), b, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), height, eve::InvalidArgument, lanes, length , 以及 eve::Result< T >::success().

被这些函数引用 makeScene().

◆ makeCross()

◆ makeCurve()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeCurve ( float  radius = 18.f,
int  lanes = 2 
)
static

Scene 2: gentle horizontal curve (no junction).

在文件 RoadNetworkRecipes.cpp 第 150 行定义.

引用了 a, addEdge(), addNode(), b, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, lanes, radius , 以及 eve::Result< T >::success().

被这些函数引用 makeScene().

◆ makeFan()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeFan ( float  span,
int  lanes,
std::vector< float >  armAnglesDeg,
std::vector< bool >  intoHub = {} 
)
static

Build a ground-level N-way fan from absolute arm angles in degrees.

参数
spanOverall leaf-to-leaf scene extent; must be at least 16 metres.
lanesForward lanes per arm in [1,4].
armAnglesDegAt least two finite angles; duplicates within one degree are merged.
intoHubOptional direction per input arm (true means leaf-to-hub); empty alternates after sorting.
返回
A validated network or a structured input/topology diagnostic.

在文件 RoadNetworkRecipes.cpp 第 263 行定义.

引用了 addEdge(), addNode(), center, connectAllTurns(), eve::procgen::road::RoadStyle::curbHeight, eve::procgen::road::RoadStyle::curbWidth, eve::procgen::road::RoadStyle::deckThickness, degrees, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), first, index, eve::InvalidArgument, lanes, eve::procgen::road::RoadStyle::laneWidth, second, eve::procgen::road::RoadStyle::sidewalkWidth, eve::Result< T >::success(), turns, u, x , 以及 z.

被这些函数引用 makeFork(), makeSkew() , 以及 makeY().

◆ makeFork()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeFork ( float  span = 32.f,
int  lanes = 2 
)
static

Three-way scene with a 60-degree acute fork.

在文件 RoadNetworkRecipes.cpp 第 331 行定义.

引用了 lanes , 以及 makeFan().

被这些函数引用 makeScene().

◆ makeInterchange()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeInterchange ( float  span = 48.f,
float  bridgeHeight = 8.f,
int  lanes = 2,
std::uint32_t  seed = 1 
)
static

◆ makeRoundabout()

◆ makeScene()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeScene ( const std::string &  scene,
float  span = 36.f,
float  bridgeHeight = 6.f,
int  lanes = 2,
std::uint32_t  seed = 1 
)
static

Dispatch a named debug/demo scene.

参数
sceneOne of: straight, curve, bridge, cross, tee/t-junction, y/y-junction, fork, skew, sloped-t, curve-uphill, tight-turn, roundabout, interchange.

在文件 RoadNetworkRecipes.cpp 第 394 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, lanes, makeBridge(), makeCross(), makeCurve(), makeFork(), makeInterchange(), makeRoundabout(), makeSkew(), makeStraight(), makeTee(), makeY(), scene , 以及 seed.

被这些函数引用 eve::procgen::road::resolveRoadRecipeNetwork().

◆ makeSkew()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeSkew ( float  span = 32.f,
int  lanes = 2 
)
static

Three-way scene with 135-degree skew corners.

在文件 RoadNetworkRecipes.cpp 第 333 行定义.

引用了 lanes , 以及 makeFan().

被这些函数引用 makeScene().

◆ makeStraight()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeStraight ( float  length = 36.f,
int  lanes = 2 
)
static

Scene 1: single flat straight segment (no junction).

在文件 RoadNetworkRecipes.cpp 第 134 行定义.

引用了 a, addEdge(), addNode(), b, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, lanes, length , 以及 eve::Result< T >::success().

被这些函数引用 makeScene().

◆ makeTee()

◆ makeY()

Result< RoadNetwork > eve::procgen::road::RoadNetwork::makeY ( float  span = 32.f,
int  lanes = 2 
)
static

Ground-level Y-junction with three arms separated by 120 degrees.

在文件 RoadNetworkRecipes.cpp 第 256 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, lanes , 以及 makeFan().

被这些函数引用 makeScene().

◆ mergeNodes()

Result< int > eve::procgen::road::RoadNetwork::mergeNodes ( std::uint32_t  keepNodeId,
std::uint32_t  removeNodeId,
float  maxDistance 
)

Atomically merge one nearby endpoint node into another stable node.

参数
keepNodeIdNode identity and position retained by the merged junction.
removeNodeIdDistinct node whose incident edge endpoints are rewired.
maxDistanceMaximum allowed 3D distance between the two nodes.
返回
Number of rewired incident edge endpoints.
注解
A direct edge between the nodes is rejected because merging it would create a self-loop. @cost Linear in road topology and lane-link count; intended for authoring operations.

在文件 RoadNetwork.cpp 第 566 行定义.

引用了 dx, dy, dz, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::NotFound, eve::PreconditionViolation, removed, eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation().

◆ nodeCount()

int eve::procgen::road::RoadNetwork::nodeCount ( ) const
inlinenoexcept

Node count.

在文件 RoadNetwork.h 第 246 行定义.

被这些函数引用 eve::procgen::road::bakeRoadNetwork().

◆ nodeResult()

◆ nodes()

◆ reconnectEdgeEndpoint()

Result< int > eve::procgen::road::RoadNetwork::reconnectEdgeEndpoint ( std::uint32_t  edgeId,
bool  fromEndpoint,
std::uint32_t  nodeId 
)

Reconnect one edge endpoint to an existing node and prune connections left at the old junction.

参数
edgeIdStable edge identity retained by the road.
fromEndpointTrue to reconnect from, false to reconnect to.
nodeIdExisting replacement endpoint node.
返回
Number of active and blocked lane connections pruned, or a structured failure with no mutation. @cost Linear in network lane-link count; intended for authoring operations.

在文件 RoadNetwork.cpp 第 746 行定义.

引用了 current, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), link, node, nodeId, nodeIndex, eve::NotFound, eve::PreconditionViolation, removed, eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), eve::procgen_editing::RoadNetworkEditTarget::makeReconnectEdgeEndpoint() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeReconnectEdgeEndpointAndConnect().

◆ removeEdge()

Result< void > eve::procgen::road::RoadNetwork::removeEdge ( std::uint32_t  edgeId)

Remove an edge and every lane link that references it.

参数
edgeIdStable edge identity.
返回
Success, NotFound or PreconditionViolation; clear custom port bindings before removing a bound edge.

在文件 RoadNetwork.cpp 第 834 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, link, node, eve::NotFound, eve::PreconditionViolation , 以及 eve::Result< T >::success().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation().

◆ removeLaneLink()

Result< void > eve::procgen::road::RoadNetwork::removeLaneLink ( const RoadLaneConnection &  link)

Remove one exact lane-to-lane connection.

参数
linkComposite connection identity to remove.
返回
Success or NotFound; failure leaves the network unchanged.

在文件 RoadNetwork.cpp 第 340 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::NotFound , 以及 eve::Result< T >::success().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::makeRemoveLaneLink().

◆ removeNode()

Result< void > eve::procgen::road::RoadNetwork::removeNode ( std::uint32_t  nodeId)

Remove an isolated node.

参数
nodeIdStable node identity with no incident edges.
返回
Success, NotFound, or PreconditionViolation without partial mutation.

在文件 RoadNetwork.cpp 第 864 行定义.

引用了 edge, eve::Diagnostic::error(), eve::Result< T >::failure(), index, nodeId, eve::NotFound, eve::PreconditionViolation , 以及 eve::Result< T >::success().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeRemoveNode().

◆ restoreEdge()

Result< void > eve::procgen::road::RoadNetwork::restoreEdge ( RoadEdge  edge)

Restore an edge with an explicit stable id for undo/import paths.

参数
edgeComplete non-degenerate edge value referencing two distinct live endpoint nodes.
返回
Success or a structured validation/conflict diagnostic.

在文件 RoadNetwork.cpp 第 225 行定义.

引用了 eve::AlreadyExists, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), from, eve::InvalidArgument, eve::procgen::road::makeRoadProfile(), eve::NotFound, point, position, eve::PreconditionViolation, eve::Result< T >::success() , 以及 to.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), eve::procgen_editing::RoadNetworkEditTarget::loadSnapshot(), eve::procgen_editing::RoadNetworkEditTarget::makeAddEdgeAndConnect() , 以及 eve::procgen::road::restoreRoadNetwork().

◆ restoreNode()

Result< void > eve::procgen::road::RoadNetwork::restoreNode ( RoadNode  node)

Restore a node with an explicit stable id for undo/import paths.

参数
nodeComplete node value with non-zero unused id.
返回
Success or a structured validation/conflict diagnostic.

在文件 RoadNetwork.cpp 第 147 行定义.

引用了 eve::AlreadyExists, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, node, position, eve::Result< T >::success(), eve::procgen::road::detail::validateConnectionAsset() , 以及 eve::procgen::road::validJunctionControl().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), eve::procgen_editing::RoadNetworkEditTarget::loadSnapshot() , 以及 eve::procgen::road::restoreRoadNetwork().

◆ reverseEdge()

Result< void > eve::procgen::road::RoadNetwork::reverseEdge ( std::uint32_t  edgeId)

Atomically reverse one edge while preserving its physical lanes, links, and side-object intervals.

参数
edgeIdStable edge identity retained after reversal.
返回
Success or NotFound; failure leaves the network unchanged.
注解
Reverses control points, swaps endpoints/directional lane counts/start-end offsets/left-right flags, and flips every lane-link direction referencing the edge. Applying twice restores the original value. @cost Linear in edge control-point and network lane-link counts; intended for authoring operations.

在文件 RoadNetwork.cpp 第 687 行定义.

引用了 eve::procgen::road::Backward, eve::procgen::road::Circular, direction, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::road::Forward, index, link, eve::NotFound, point, eve::procgen::road::detail::reverseRoadAuthoring(), eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeReverseEdge().

◆ revision()

std::uint64_t eve::procgen::road::RoadNetwork::revision ( ) const
inlinenoexcept

Revision.

在文件 RoadNetwork.h 第 254 行定义.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::revision().

◆ setEdgeControlPoints()

Result< void > eve::procgen::road::RoadNetwork::setEdgeControlPoints ( std::uint32_t  edgeId,
std::vector< RoadControlPoint >  controlPoints 
)

Replace one edge spline while preserving its node-owned endpoint positions.

参数
edgeIdStable edge identity.
controlPointsOwning finite control-point sequence containing at least one non-degenerate segment.
返回
Success or a structured validation diagnostic; failure leaves the edge unchanged. @cost Copies point authoring; bound custom ports additionally validate an owning graph candidate.
注解
Synchronous owner-thread call; borrowed views expire after success.

在文件 RoadNetwork.cpp 第 623 行定义.

引用了 edge, eve::Diagnostic::error(), eve::Result< T >::failure(), from, index, eve::InvalidArgument, eve::NotFound, point, eve::PreconditionViolation, eve::Result< T >::success(), to , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeSetEdgeControlPoints().

◆ setEdgeLaneCounts()

Result< int > eve::procgen::road::RoadNetwork::setEdgeLaneCounts ( std::uint32_t  edgeId,
int  lanesForward,
int  lanesBackward 
)

Atomically replace directional lane counts and remove links that become out of range.

参数
edgeIdStable edge identity.
lanesForwardForward lane count.
lanesBackwardReverse lane count.
返回
Number of removed stale lane links, or a structured failure with no mutation.

在文件 RoadNetwork.cpp 第 659 行定义.

引用了 edge, eve::Diagnostic::error(), eve::Result< T >::failure(), idx, eve::procgen::raster_detail::invalid(), link, eve::procgen::road::makeRoadProfile(), eve::NotFound, removed, eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeSetEdgeLaneCounts().

◆ setEdgeStyle()

Result< void > eve::procgen::road::RoadNetwork::setEdgeStyle ( std::uint32_t  edgeId,
RoadStyle  style 
)

Replace owning style/section/interval authoring atomically.

返回
Success or structured validation failure; custom socket mismatches leave revision unchanged. @cost Copies style data; bound asset seams additionally validate a full owning graph candidate.
注解
Synchronous owner-thread call; use editing candidate/preflight for grouped changes.

在文件 RoadNetwork.cpp 第 472 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), idx, eve::procgen::road::makeRoadProfile(), eve::NotFound, eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeSetEdgeStyle().

◆ setNodeConnection()

Result< void > eve::procgen::road::RoadNetwork::setNodeConnection ( std::uint32_t  nodeId,
RoadConnection  connection 
)

Atomically attach or clear an owning custom connection mesh and its port bindings.

参数
nodeIdLive node identity; the node owns the copied/moved asset values.
connectionLocal geometry/ports; empty restores the procedural junction.
返回
Success or geometry/binding diagnostic without changing revision on failure. @cost Linear in bounded mesh size plus quadratic port-section validation; authoring only.
注解
Synchronous owner-thread call, no callbacks; bake separately checks spline/port seam compatibility.

在文件 RoadConnection.cpp 第 195 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, nodeId, eve::NotFound, eve::Result< T >::success() , 以及 valid.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeSetNodeConnection().

◆ setNodeJunctionControl()

Result< void > eve::procgen::road::RoadNetwork::setNodeJunctionControl ( std::uint32_t  nodeId,
RoadJunctionControl  control 
)

Replace one node's authoritative traffic-control policy.

参数
nodeIdStable node identity.
controlValid junction control enum stored with the node and its snapshots.
返回
Success or a structured diagnostic; failure leaves the network unchanged.

在文件 RoadNetwork.cpp 第 553 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, node, nodeId, eve::NotFound, eve::Result< T >::success() , 以及 eve::procgen::road::validJunctionControl().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), makeRoundabout() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeSetNodeJunctionControl().

◆ setNodeJunctionRadius()

Result< void > eve::procgen::road::RoadNetwork::setNodeJunctionRadius ( std::uint32_t  nodeId,
float  junctionRadius 
)

Replace one node's positive junction trim radius.

参数
nodeIdStable node identity.
junctionRadiusFinite positive radius used by junction and edge trimming.
返回
Success or a structured diagnostic; failure leaves the network unchanged.

在文件 RoadNetwork.cpp 第 540 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, node, nodeId, eve::NotFound , 以及 eve::Result< T >::success().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeSetNodeJunctionRadius().

◆ setNodePosition()

Result< void > eve::procgen::road::RoadNetwork::setNodePosition ( std::uint32_t  nodeId,
float  x,
float  y,
float  z 
)

Move a node and atomically re-anchor every incident edge endpoint.

参数
nodeIdStable node identity.
xNew finite world X coordinate.
yNew finite world Y coordinate.
zNew finite world Z coordinate.
返回
Success, NotFound, or a geometry diagnostic; failure leaves the network unchanged.

在文件 RoadNetwork.cpp 第 498 行定义.

引用了 active, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::InvariantViolation, node, nodeId, eve::NotFound, eve::Result< T >::success(), valid, x, y , 以及 z.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation() , 以及 eve::procgen_editing::RoadNetworkEditTarget::makeMoveNode().

◆ splitEdge() [1/2]

Result< RoadEdgeSplitResult > eve::procgen::road::RoadNetwork::splitEdge ( std::uint32_t  edgeId,
std::size_t  controlPointIndex,
float  junctionRadius,
std::uint32_t  nodeId,
std::uint32_t  secondEdgeId 
)

Split an edge while restoring identities reserved by an editor transaction.

参数
edgeIdExisting edge retained by the first half.
controlPointIndexInterior authored control point used by the split.
junctionRadiusRadius assigned to the inserted node.
nodeIdReserved non-zero identity for the inserted node.
secondEdgeIdReserved non-zero identity for the continuation edge.
返回
Stable identities for the inserted node and both edge halves. @cost Linear in road topology and lane-link count; intended for authoring transactions.

在文件 RoadNetworkSplit.cpp 第 98 行定义.

引用了 eve::procgen::road::Backward, eve::procgen::road::RoadEdge::controlPoints, eve::Diagnostic::error(), eve::Result< T >::failure(), first, eve::procgen::road::Forward, idx, eve::InvalidArgument, eve::procgen::road::RoadEdge::lanesBackward, eve::procgen::road::RoadEdge::lanesForward, link, node, nodeId, eve::NotFound, result, second, eve::procgen::road::detail::splitRoadAuthoring(), eve::Result< T >::success(), eve::procgen::road::RoadEdge::to, valid , 以及 eve::Result< T >::value().

◆ splitEdge() [2/2]

Result< RoadEdgeSplitResult > eve::procgen::road::RoadNetwork::splitEdge ( std::uint32_t  edgeId,
std::size_t  controlPointIndex,
float  junctionRadius = 6.f 
)

Split an edge at one authored interior control point as a single topology mutation.

参数
edgeIdStable edge identity retained by the first half.
controlPointIndexInterior control-point index in [1, size-2].
junctionRadiusPositive radius for the inserted node.
返回
Inserted node and both edge identities; failure leaves the network unchanged.
注解
Existing links at the old destination migrate to the continuation edge; same-direction lane links are inserted between the two halves.

在文件 RoadNetworkSplit.cpp 第 45 行定义.

引用了 splitEdge().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), eve::procgen_editing::RoadNetworkEditTarget::makeSplitEdge() , 以及 splitEdge().

◆ splitEdgeAtPosition() [1/2]

Result< RoadEdgeSplitResult > eve::procgen::road::RoadNetwork::splitEdgeAtPosition ( std::uint32_t  edgeId,
RoadControlPoint  position,
float  maxDistance,
float  junctionRadius,
std::uint32_t  nodeId,
std::uint32_t  secondEdgeId 
)

◆ splitEdgeAtPosition() [2/2]

Result< RoadEdgeSplitResult > eve::procgen::road::RoadNetwork::splitEdgeAtPosition ( std::uint32_t  edgeId,
RoadControlPoint  position,
float  maxDistance,
float  junctionRadius = 6.f 
)

Project a world position onto the baked Catmull-Rom centerline and split at the nearest point.

参数
edgeIdExisting edge retained by the first half.
positionFinite world-space position used for nearest-point projection.
maxDistanceMaximum 3D snap distance from position to centerline.
junctionRadiusPositive radius assigned to the inserted node.
返回
Stable identities for the inserted node and both edge halves. @cost Linear in at most 4096 sampled spline intervals plus topology and lane-link count.

在文件 RoadNetworkSplit.cpp 第 187 行定义.

引用了 position , 以及 splitEdgeAtPosition().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), eve::procgen_editing::RoadNetworkEditTarget::makeConnectNodeAtPosition(), eve::procgen_editing::RoadNetworkEditTarget::makeSplitEdgeAtPosition() , 以及 splitEdgeAtPosition().

◆ splitEdgeAtSplineParameter()

Result< RoadEdgeSplitResult > eve::procgen::road::RoadNetwork::splitEdgeAtSplineParameter ( std::uint32_t  edgeId,
float  parameter,
float  junctionRadius = 6.f,
std::uint32_t  nodeId = 0,
std::uint32_t  secondEdgeId = 0 
)

Split at a normalized parameter on the same Catmull-Rom centerline used by road baking.

参数
edgeIdExisting edge retained by the first half.
parameterNormalized open interval (0,1) along spline segment parameterization.
junctionRadiusPositive radius assigned to the inserted node.
nodeIdOptional reserved node identity, or zero for automatic allocation.
secondEdgeIdOptional reserved continuation edge identity, or zero for automatic allocation.
返回
Stable split identities; failure leaves the network unchanged.
注解
An evaluated point is inserted only when the parameter is not already an authored control point. @cost Linear in edge control points plus topology and lane-link count; authoring only.

在文件 RoadNetworkSplit.cpp 第 50 行定义.

引用了 changed, eve::Diagnostic::error(), eve::Result< T >::failure(), idx, eve::InvalidArgument, nodeId, eve::NotFound, parameter, path, points, result, eve::Result< T >::success(), eve::Result< T >::value() , 以及 eve::procgen::road::RoadControlPoint::x.

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::applyDomainOperation(), eve::procgen_editing::RoadNetworkEditTarget::makeConnectEdgeIntersection() , 以及 splitEdgeAtPosition().

◆ unblockLaneLink()

Result< void > eve::procgen::road::RoadNetwork::unblockLaneLink ( const RoadLaneConnection &  link)

Remove one exact persistent lane-link prohibition.

在文件 RoadNetwork.cpp 第 329 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::NotFound , 以及 eve::Result< T >::success().

被这些函数引用 eve::procgen_editing::RoadNetworkEditTarget::makeUnblockLaneLink().

◆ validate()

Result< void > eve::procgen::road::RoadNetwork::validate ( ) const

该类的文档由以下文件生成: