载入中...
搜索中...
未找到
RoadTypes.h
浏览该文件的文档.
16enum class RoadPathControl : std::uint8_t { Spline = 0, StraightXZ = 1, StraightXYZ = 2, Circular = 3 };
125enum class RoadSideTerrainMode : std::uint8_t { None = 0, Center = 1, Lowest = 2, Highest = 3, Average = 4 };
127enum class RoadSideAlignment : std::uint8_t { None = 0, TerrainNormal = 1, PathForward = 2, PathNormal = 3 };
179enum class RoadSamplingPolicy : std::uint8_t { MaximumIntervals = 0, ParametricDistanceTurn = 1 };
362[[nodiscard]] EVENGINE_API_DOMAINS Result<RoadProfile> makeRoadProfile(const RoadStyle& style, int lanesForward,
370[[nodiscard]] EVENGINE_API_DOMAINS const char* roadMaterialGroup(RoadMaterial material) noexcept;
Strong asset, definition, object and generic resource references.
Move-only, checked operation results for the common layer.
Definition TerrainWorldWorkspace.h:12
RoadSideTerrainMode
Height-only ground projection of generic side-object anchors; bounds are local horizontal footprint m...
Definition RoadTypes.h:125
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
RoadJunctionControl
Authoritative traffic-control policy applied to every approach of one junction node.
Definition RoadTypes.h:232
@ Signal
Every incoming approach is controlled by a traffic signal.
@ Uncontrolled
Edge trafficPriority resolves right-of-way without a mandatory stop.
@ Yield
Lower-priority approaches yield; equal-priority approaches all yield.
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
RoadSideReference
Lateral origin for rigid facilities; LegacyOutside retains historical bake-option offsets.
Definition RoadTypes.h:160
@ AsphaltEdges
@ LegacyOutside
RoadSidePathSampling
Facility path policy; SurfaceSegments follows the road's retained section centers and segment directi...
Definition RoadTypes.h:162
@ SurfaceSegments
RoadPathControl
Outgoing road span controller; StraightXZ retains smooth height, StraightXYZ is fully linear.
Definition RoadTypes.h:16
@ StraightXYZ
@ StraightXZ
RoadSideAlignment
Owned side-instance orientation rule; height selection remains independently authored.
Definition RoadTypes.h:127
@ PathForward
@ TerrainNormal
RoadWidthInterpolation
Cross-section and structural style for one road edge.
Definition RoadTypes.h:149
RoadSideDistribution
Rigid side-anchor distribution; historical snapshots retain the half-spacing phase....
Definition RoadTypes.h:158
@ LegacyCentered
RoadLaneDirection
Travel direction of a lane relative to the authored edge centerline.
Definition RoadTypes.h:304
@ Backward
Travels from RoadEdge::to to RoadEdge::from.
RoadSamplingPolicy
Owning metric sampling semantics; absent snapshot fields retain MaximumIntervals.
Definition RoadTypes.h:179
@ MaximumIntervals
@ ParametricDistanceTurn
@ Sidewalk
RoadFrameOrientation
Cross-section orientation before authored roll; snapshots missing this field retain transport.
Definition RoadTypes.h:151
@ ParallelTransport
@ MarkingYellow
@ TunnelPortalAsphalt
Driving surface inside an authored tunnel portal footprint.
@ TunnelAsphalt
@ BridgeAsphalt
PrefabRootPose
Immutable prefab placement convention shared by geometry bounds and renderer preparation....
Definition PrefabRootPose.h:11
@ ReplaceTranslationRotation
Asset port with outward orthonormal frame, full seam section and network-local edge binding.
Definition RoadTypes.h:251
bool sectionClosed
Closed seam topology must match the attached road profile.
Definition RoadTypes.h:256
std::vector< RoadProfilePoint > section
Outward-facing section; must coincide with mesh boundary vertices.
Definition RoadTypes.h:257
Material-qualified indexed triangle owned by a custom connection.
Definition RoadTypes.h:246
Owning renderer-neutral custom connection vertex in node-local space.
Definition RoadTypes.h:240
Owning custom junction asset snapshot; all geometry/ports share one node-local transform.
Definition RoadTypes.h:266
std::vector< RoadConnectionVertex > vertices
Definition RoadTypes.h:270
std::vector< RoadConnectionPort > ports
Empty selects the procedural junction, with no custom mesh.
Definition RoadTypes.h:272
std::vector< RoadFacilityRoute > facilityRoutes
Explicit routes override automatic two-arm continuation.
Definition RoadTypes.h:267
std::vector< RoadConnectionTriangle > triangles
Definition RoadTypes.h:271
Continuous facility over an authored edge interval; all profiles and prefab meshes are owned values.
Definition RoadTypes.h:112
RoadFacilityPrefab prefab
Empty source mesh selects section sweep; profile remains the socket envelope.
Definition RoadTypes.h:113
float lateralOffset
Metres from the authored centerline, signed along its side axis.
Definition RoadTypes.h:116
std::vector< RoadProfilePoint > profile
Closed simple section; outgoing segment material.
Definition RoadTypes.h:118
float verticalOffset
Definition RoadTypes.h:117
One authored control point on a road centerline (world space, Y-up).
Definition RoadTypes.h:19
float splineStrength
Outgoing Catmull span tangent strength in [0.01,1]; .5 preserves classic Catmull.
Definition RoadTypes.h:27
bool circularFromEnd
Derive circular geometry from the following endpoint tangent after reversal.
Definition RoadTypes.h:32
bool alignStraightEnd
Straight-adjacent XZ alignment with zero vertical derivative; reversal swaps ends.
Definition RoadTypes.h:30
float rollDegrees
Unwrapped crossfall in [-360,360] degrees; interpolation preserves the authored rotation direction.
Definition RoadTypes.h:25
float rollCenterOffset
Signed width fraction of the roll axis: -.5 left, 0 center, .5 right.
Definition RoadTypes.h:33
bool alignStraightStart
Definition RoadTypes.h:29
float widthScale
Positive driving-surface width multiplier in [0.05,16]; curb/sidewalk widths stay in metres.
Definition RoadTypes.h:23
Stable identities produced by one atomic edge split.
Definition RoadTypes.h:297
std::uint32_t firstEdgeId
Original edge identity retained by the first half.
Definition RoadTypes.h:299
Directed centerline edge with optional reverse lanes.
Definition RoadTypes.h:286
std::vector< RoadControlPoint > controlPoints
Definition RoadTypes.h:290
Owned prefab mesh; local Z in [0,length] deforms along the facility arc. Source range preserves cut g...
Definition RoadTypes.h:94
std::vector< RoadPrefabVertex > vertices
Definition RoadTypes.h:108
std::vector< RoadPrefabTriangle > triangles
Definition RoadTypes.h:109
int middleCopies
Bounded authored repetitions; segment lengths determine their relative arc lengths.
Definition RoadTypes.h:96
bool reverseRepeatSequence
Retained placement orientation for exact-spacing partial segments after reversal.
Definition RoadTypes.h:102
bool weldCompatibleVertices
Share indices only when position, normal and UV agree within 1e-5.
Definition RoadTypes.h:97
RoadPrefabSegment startMesh
Definition RoadTypes.h:95
bool automaticSpacing
Fit the nearest positive number of middle segments, averaging spacing over the arc.
Definition RoadTypes.h:98
float repeatSourceLength
Zero derives the full source arc; split fragments retain the original metre span.
Definition RoadTypes.h:104
One explicit undirected facility route through a node; endpoints belong to incident edges....
Definition RoadTypes.h:262
std::uint32_t secondFacility
Definition RoadTypes.h:263
std::uint32_t firstFacility
Definition RoadTypes.h:263
One legal lane-to-lane connection inside a junction.
Definition RoadTypes.h:315
RoadLaneDirection outDirection
Definition RoadTypes.h:321
RoadLaneDirection inDirection
Definition RoadTypes.h:320
RoadJunctionControl junctionControl
Definition RoadTypes.h:281
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
Optional owned source segment for a prefab's start or end. Empty mesh omits the segment.
Definition RoadTypes.h:85
std::vector< RoadPrefabTriangle > triangles
Definition RoadTypes.h:89
std::vector< RoadPrefabVertex > vertices
Definition RoadTypes.h:88
Indexed source-prefab triangle with renderer-neutral material.
Definition RoadTypes.h:78
std::uint32_t smoothingGroup
Zero preserves authored normals; equal positive groups smooth coincident positions.
Definition RoadTypes.h:81
Owned source vertex in prefab-local (side, up, forward) axes, with normal and UV.
Definition RoadTypes.h:72
One 2D profile sample in the edge local (side, up) plane.
Definition RoadTypes.h:53
Owning open profile polyline for one edge style and lane layout.
Definition RoadTypes.h:347
std::vector< RoadProfilePoint > points
Definition RoadTypes.h:348
Stable asset link at an exact admitted package build; stale resolution fails without substituting new...
Definition RoadTypes.h:130
eve::PersistentId buildId
Definition RoadTypes.h:132
eve::PrefabRootPose rootPose
New road placements replace the source root pose.
Definition RoadTypes.h:133
Owning rigid-facility placement settings, copied with the road style. Explicit references ignore bake...
Definition RoadTypes.h:170
RoadSidePathSampling pathSampling
Explicit sampled-surface opt-in; missing fields retain Analytic.
Definition RoadTypes.h:175
RoadSideReference reference
Definition RoadTypes.h:171
float verticalOffset
World-up metres, bounded to +/-10000; reference default is .02.
Definition RoadTypes.h:173
Owned side-object ground rule; None height retains road height, while TerrainNormal alignment indepen...
Definition RoadTypes.h:138
int samplesPerAxis
Uniform inclusive footprint grid in [2,17]; Center performs one query.
Definition RoadTypes.h:141
std::optional< RoadSideAssetBinding > asset
Absent uses explicit footprint; present resolves admitted prefab bounds.
Definition RoadTypes.h:145
RoadSideAlignment alignment
None keeps yaw only; other modes produce full Euler orientation.
Definition RoadTypes.h:142
Normalized arc-distance interval; nonoverlapping, sorted, owned by RoadNetwork.
Definition RoadTypes.h:63
float portalStartLength
Definition RoadTypes.h:68
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
bool sideObjectsRight
Emit anchors on the authored centerline's right side.
Definition RoadTypes.h:220
float sideObjectEndOffset
Empty distance after the last side-object anchor.
Definition RoadTypes.h:218
float samplingSpacingMeters
New roads use the measured 2m trigger; explicit zero keeps legacy fixed counts.
Definition RoadTypes.h:221
int crossSectionSubdivisions
Subdivide every authored section segment, bounded to [1,32].
Definition RoadTypes.h:224
std::vector< RoadStructureInterval > structures
Explicit normalized arc intervals; nonempty disables legacy automatic structures.
Definition RoadTypes.h:196
RoadSideTerrainRule sideTerrain
Terrain height selection for side.left/right anchors only.
Definition RoadTypes.h:184
std::vector< RoadContinuousFacility > facilities
Continuous swept facilities, clipped by sockets.
Definition RoadTypes.h:197
RoadFrameOrientation frameOrientation
New roads retain horizontal unbanked sections.
Definition RoadTypes.h:187
RoadRollInterpolation rollInterpolation
New roads ease crossfall per spline span; old snapshots retain Linear.
Definition RoadTypes.h:185
RoadSideDistribution sideObjectDistribution
Explicit rigid-anchor spacing policy.
Definition RoadTypes.h:216
RoadSidePlacement sidePlacement
Single source for rigid-facility origin and transform offsets.
Definition RoadTypes.h:183
RoadSamplingPolicy samplingPolicy
Definition RoadTypes.h:225
bool automaticStructures
Empty intervals retain legacy decks/piers unless explicitly disabled.
Definition RoadTypes.h:194
float samplingAngleDegrees
New roads match the reference 45 degree target; scan requires >=1.
Definition RoadTypes.h:223
float sideObjectStartOffset
Empty distance before the first side-object anchor.
Definition RoadTypes.h:215
RoadWidthInterpolation widthInterpolation
Definition RoadTypes.h:189
RoadTerrainPolicy terrainPolicy
Authoritative ground-channel policy; execution remains explicit.
Definition RoadTypes.h:228
int trafficPriority
Higher incoming-road values win uncontrolled junction priority.
Definition RoadTypes.h:214
Owning per-road terrain author policy; copied with styles, presets and history. Owner-thread value wi...
Definition RoadTerrainPolicy.h:7