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

Owning multi-segment 3D spline with deterministic bounded sampling. 更多...

#include <SplinePath.h>

Public 成员函数

Result< void > setKindResult (std::string_view kind)
 Select linear, catmullRom, quadraticBezier, or cubic bezier interpolation.
 
void setClosed (bool closed)
 Configure whether the final point connects back to the first.
 
Result< void > addPointResult (const SplinePoint &point)
 Append an owning control point after validating finite coordinates.
 
Result< void > setPointResult (int index, const SplinePoint &point)
 Replace a control point atomically.
 
Result< void > setPointProfileResult (int index, float rollDegrees, float scaleX, float scaleY)
 Atomically replace per-point roll and cross-section scale after finite positive validation.
 
Result< void > setPointRotationResult (int index, float pitchDegrees, float yawDegrees, float rollDegrees)
 Atomically replace point-local pitch, yaw, and roll orientation.
 
Result< void > setPointChunkBreakResult (int index, bool disconnected)
 Start or reconnect an open-path chunk before one non-first point.
 
Result< void > removePointResult (int index)
 Remove a control point by stable current index.
 
void clear ()
 Remove every point.
 
Result< SplineSample > evaluateResult (float t) const
 Evaluate by normalized segment parameter, not arc length.
 
Result< SplineSample > evaluateDistanceResult (float distance, int samplesPerSegment=24) const
 Evaluate by world-space distance using a bounded arc-length table.
 
Result< float > lengthResult (int samplesPerSegment=24) const
 Return approximate total world-space length.
 
Result< SplineSample > closestPointResult (float x, float y, float z, int samplesPerSegment=32) const
 Return the sampled closest path location to a point.
 
Result< std::vector< SplineFrameSample > > sampleFramesResult (int sampleCount, bool uniformByDistance, float rollDegrees=0.f, int samplesPerSegment=24) const
 Sample stable parallel-transport frames for extrusion and placement.
 
Result< SplineSample > travelResult (float distance, std::string_view wrapMode="clamp", int samplesPerSegment=24) const
 Evaluate distance-driven travel using clamp, loop, or pingPong wrapping without reading wall time.
 
Result< SplineFrameSample > travelFrameResult (float distance, std::string_view wrapMode="clamp", int samplesPerSegment=24) const
 Evaluate distance-driven travel with a transported orientation frame.
 
Result< SplineDistribution > distributeResult (int instanceCount, bool includeEnd=true, int samplesPerSegment=24) const
 Produce owning arc-length-uniform samples for instance distribution.
 
Result< SplinePolyline > polylineResult (int sampleCount=64, bool uniformByDistance=true, int samplesPerSegment=24) const
 Build an owning sampled polyline without depending on a graphics module.
 
Result< void > applyShapePresetResult (std::string_view preset, int pointCount, float radius, float height, float turns=1.f)
 Atomically replace this path with line, circle, arc, spiral, or wave preset points.
 
int pointCount () const noexcept
 Return point count.
 
int segmentCount () const noexcept
 Return segment count.
 
int chunkCount () const noexcept
 Return the number of independently connected chunks.
 
Result< SplinePath > chunkPathResult (int chunk) const
 Copy one independently connected chunk as an owning path.
 
std::string_view kind () const noexcept
 Return interpolation kind.
 
bool isClosed () const noexcept
 Report whether the path is closed.
 
std::uint64_t revision () const noexcept
 Return monotonic mutation revision.
 

详细描述

Owning multi-segment 3D spline with deterministic bounded sampling.

Calls are synchronous and owner-thread only. Mutations invalidate the arc-length cache. Returned samples are values and retain no pointers into the path.

在文件 SplinePath.h 第 91 行定义.

成员函数说明

◆ addPointResult()

Result< void > eve::procgen::SplinePath::addPointResult ( const SplinePoint &  point)

Append an owning control point after validating finite coordinates.

在文件 SplinePath.cpp 第 63 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, point , 以及 eve::Result< T >::success().

◆ applyShapePresetResult()

Result< void > eve::procgen::SplinePath::applyShapePresetResult ( std::string_view  preset,
int  pointCount,
float  radius,
float  height,
float  turns = 1.f 
)

Atomically replace this path with line, circle, arc, spiral, or wave preset points.

参数
presetNamed preset.
pointCountGenerated control-point count in [2, 4096].
radiusPositive horizontal radius or half-length.
heightVertical extent or wave amplitude.
turnsPositive revolution/cycle count.

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

引用了 angle, eve::Diagnostic::error(), eve::Result< T >::failure(), height, index, eve::InvalidArgument, point, pointCount(), radius, eve::Result< T >::success(), t , 以及 turns.

◆ chunkCount()

int eve::procgen::SplinePath::chunkCount ( ) const
noexcept

Return the number of independently connected chunks.

在文件 SplinePath.cpp 第 157 行定义.

被这些函数引用 chunkPathResult() , 以及 polylineResult().

◆ chunkPathResult()

Result< SplinePath > eve::procgen::SplinePath::chunkPathResult ( int  chunk) const

Copy one independently connected chunk as an owning path.

在文件 SplinePath.cpp 第 165 行定义.

引用了 chunkCount(), current, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, point, eve::PreconditionViolation, segmentCount(), eve::Result< T >::success() , 以及 u.

被这些函数引用 polylineResult().

◆ clear()

void eve::procgen::SplinePath::clear ( )

Remove every point.

在文件 SplinePath.cpp 第 143 行定义.

◆ closestPointResult()

Result< SplineSample > eve::procgen::SplinePath::closestPointResult ( float  x,
float  y,
float  z,
int  samplesPerSegment = 32 
) const

Return the sampled closest path location to a point.

在文件 SplinePath.cpp 第 366 行定义.

引用了 best, dx, dy, dz, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::procgen::raster_detail::sample(), segmentCount(), eve::Result< T >::success(), x, y , 以及 z.

◆ distributeResult()

Result< SplineDistribution > eve::procgen::SplinePath::distributeResult ( int  instanceCount,
bool  includeEnd = true,
int  samplesPerSegment = 24 
) const

Produce owning arc-length-uniform samples for instance distribution.

在文件 SplinePath.cpp 第 598 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), instanceCount, eve::InvalidArgument, sampleFramesResult() , 以及 eve::Result< T >::success().

◆ evaluateDistanceResult()

Result< SplineSample > eve::procgen::SplinePath::evaluateDistanceResult ( float  distance,
int  samplesPerSegment = 24 
) const

Evaluate by world-space distance using a bounded arc-length table.

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

引用了 distance, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::procgen::raster_detail::sample(), segmentCount(), eve::Result< T >::success(), u , 以及 value.

被这些函数引用 sampleFramesResult() , 以及 travelResult().

◆ evaluateResult()

Result< SplineSample > eve::procgen::SplinePath::evaluateResult ( float  t) const

Evaluate by normalized segment parameter, not arc length.

在文件 SplinePath.cpp 第 285 行定义.

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

被这些函数引用 sampleFramesResult().

◆ isClosed()

bool eve::procgen::SplinePath::isClosed ( ) const
inlinenoexcept

Report whether the path is closed.

在文件 SplinePath.h 第 167 行定义.

◆ kind()

std::string_view eve::procgen::SplinePath::kind ( ) const
inlinenoexcept

Return interpolation kind.

在文件 SplinePath.h 第 165 行定义.

被这些函数引用 setKindResult().

◆ lengthResult()

Result< float > eve::procgen::SplinePath::lengthResult ( int  samplesPerSegment = 24) const

Return approximate total world-space length.

在文件 SplinePath.cpp 第 325 行定义.

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

被这些函数引用 sampleFramesResult() , 以及 travelResult().

◆ pointCount()

int eve::procgen::SplinePath::pointCount ( ) const
inlinenoexcept

◆ polylineResult()

Result< SplinePolyline > eve::procgen::SplinePath::polylineResult ( int  sampleCount = 64,
bool  uniformByDistance = true,
int  samplesPerSegment = 24 
) const

◆ removePointResult()

Result< void > eve::procgen::SplinePath::removePointResult ( int  index)

Remove a control point by stable current index.

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

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

◆ revision()

std::uint64_t eve::procgen::SplinePath::revision ( ) const
inlinenoexcept

Return monotonic mutation revision.

在文件 SplinePath.h 第 169 行定义.

◆ sampleFramesResult()

Result< std::vector< SplineFrameSample > > eve::procgen::SplinePath::sampleFramesResult ( int  sampleCount,
bool  uniformByDistance,
float  rollDegrees = 0.f,
int  samplesPerSegment = 24 
) const

Sample stable parallel-transport frames for extrusion and placement.

参数
sampleCountNumber of intervals; returns sampleCount plus one frames.
uniformByDistanceUse the arc-length table instead of segment parameter spacing.
rollDegreesConstant roll applied about each tangent after transport.
samplesPerSegmentArc-table resolution when uniformByDistance is true.
返回
Owning deterministic frame samples, or a structured validation diagnostic.
注解
Synchronous, owner-thread-only, non-reentrant; results retain no path references.

在文件 SplinePath.cpp 第 391 行定义.

引用了 angle, c, eve::Diagnostic::error(), evaluateDistanceResult(), evaluateResult(), index, eve::InvalidArgument, length, lengthResult(), pitch, reference, roll, s, eve::procgen::raster_detail::sample(), side, tangent, up , 以及 yaw.

被这些函数引用 distributeResult() , 以及 travelFrameResult().

◆ segmentCount()

int eve::procgen::SplinePath::segmentCount ( ) const
noexcept

Return segment count.

在文件 SplinePath.cpp 第 149 行定义.

被这些函数引用 chunkPathResult(), closestPointResult(), evaluateDistanceResult(), polylineResult() , 以及 travelFrameResult().

◆ setClosed()

void eve::procgen::SplinePath::setClosed ( bool  closed)

Configure whether the final point connects back to the first.

在文件 SplinePath.cpp 第 51 行定义.

◆ setKindResult()

Result< void > eve::procgen::SplinePath::setKindResult ( std::string_view  kind)

Select linear, catmullRom, quadraticBezier, or cubic bezier interpolation.

在文件 SplinePath.cpp 第 41 行定义.

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

被这些函数引用 eve::procgen_editing::SplinePathDocument::compilePath() , 以及 eve::procgen_editing::detail::findUniqueInteriorIntersection().

◆ setPointChunkBreakResult()

Result< void > eve::procgen::SplinePath::setPointChunkBreakResult ( int  index,
bool  disconnected 
)

Start or reconnect an open-path chunk before one non-first point.

在文件 SplinePath.cpp 第 119 行定义.

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

◆ setPointProfileResult()

Result< void > eve::procgen::SplinePath::setPointProfileResult ( int  index,
float  rollDegrees,
float  scaleX,
float  scaleY 
)

Atomically replace per-point roll and cross-section scale after finite positive validation.

在文件 SplinePath.cpp 第 84 行定义.

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

◆ setPointResult()

Result< void > eve::procgen::SplinePath::setPointResult ( int  index,
const SplinePoint &  point 
)

◆ setPointRotationResult()

Result< void > eve::procgen::SplinePath::setPointRotationResult ( int  index,
float  pitchDegrees,
float  yawDegrees,
float  rollDegrees 
)

Atomically replace point-local pitch, yaw, and roll orientation.

在文件 SplinePath.cpp 第 102 行定义.

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

◆ travelFrameResult()

Result< SplineFrameSample > eve::procgen::SplinePath::travelFrameResult ( float  distance,
std::string_view  wrapMode = "clamp",
int  samplesPerSegment = 24 
) const

Evaluate distance-driven travel with a transported orientation frame.

在文件 SplinePath.cpp 第 573 行定义.

引用了 blend, distance, eve::Result< T >::failure(), eve::procgen::raster_detail::sample(), sampleFramesResult(), segmentCount(), side, eve::Result< T >::success(), travelResult() , 以及 up.

◆ travelResult()

Result< SplineSample > eve::procgen::SplinePath::travelResult ( float  distance,
std::string_view  wrapMode = "clamp",
int  samplesPerSegment = 24 
) const

Evaluate distance-driven travel using clamp, loop, or pingPong wrapping without reading wall time.

在文件 SplinePath.cpp 第 548 行定义.

引用了 distance, eve::Diagnostic::error(), evaluateDistanceResult(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 lengthResult().

被这些函数引用 travelFrameResult().


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