载入中...
搜索中...
未找到
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< 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 edge style 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
 Node result.
 
Result< RoadEdge > edgeResult (std::uint32_t id) const
 Edge result.
 
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 = {} 
)

◆ 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 第 236 行定义.

◆ 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 第 372 行定义.

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

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

◆ clear()

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

Clear every node, edge and link.

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

◆ 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 第 414 行定义.

引用了 eve::procgen::road::Backward, current, directions, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::road::Forward, 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 第 777 行定义.

引用了 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 第 232 行定义.

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

◆ edgeResult()

◆ edges()

const std::vector< RoadEdge > & eve::procgen::road::RoadNetwork::edges ( ) const
inlinenoexcept

◆ laneLinkCount()

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

Lane link count.

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

被这些函数引用 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.

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

引用了 a, addEdge(), addNode(), b, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), height, eve::InvalidArgument, 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).

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

引用了 a, addEdge(), addNode(), b, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, 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.

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

引用了 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, 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.

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

引用了 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.

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

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

◆ makeSkew()

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

Three-way scene with 135-degree skew corners.

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

引用了 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).

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

引用了 a, addEdge(), addNode(), b, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, 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.

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

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 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 第 601 行定义.

引用了 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 第 230 行定义.

被这些函数引用 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 第 732 行定义.

引用了 current, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::road::RoadLaneConnection::inEdge, node, nodeId, nodeIndex, eve::NotFound, eve::procgen::road::RoadLaneConnection::outEdge, 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 or NotFound; failure leaves the network unchanged.

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

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::NotFound , 以及 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 第 403 行定义.

引用了 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 第 1022 行定义.

引用了 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 第 295 行定义.

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

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

◆ 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 第 230 行定义.

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

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

◆ 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 第 704 行定义.

引用了 eve::procgen::road::Backward, direction, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::road::Forward, index, eve::procgen::road::RoadLaneConnection::inDirection, eve::procgen::road::RoadLaneConnection::inEdge, eve::NotFound, eve::procgen::road::RoadLaneConnection::outDirection, eve::procgen::road::RoadLaneConnection::outEdge, 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 第 238 行定义.

被这些函数引用 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.

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

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

被这些函数引用 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 
)

◆ setEdgeStyle()

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

◆ 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 第 588 行定义.

引用了 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 第 575 行定义.

引用了 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 第 533 行定义.

引用了 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().

◆ 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.

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

引用了 eve::procgen::road::Backward, eve::procgen::road::RoadEdge::controlPoints, eve::Diagnostic::error(), eve::Result< T >::failure(), first, eve::procgen::road::Forward, idx, eve::procgen::road::RoadLaneConnection::inDirection, eve::procgen::road::RoadLaneConnection::inEdge, eve::InvalidArgument, eve::procgen::road::RoadEdge::lanesBackward, eve::procgen::road::RoadEdge::lanesForward, node, nodeId, eve::NotFound, eve::procgen::road::RoadLaneConnection::outDirection, eve::procgen::road::RoadLaneConnection::outEdge, second, eve::procgen::road::RoadEdge::style, 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.

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

引用了 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.

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

引用了 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.

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

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), idx, eve::InvalidArgument, nodeId, eve::NotFound, path, points, split, 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 第 392 行定义.

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

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

◆ validate()


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