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

CPU geometry builder for A-to-B selection indicators, independent of object lifetime. @ownership Caller owns the builder and returned meshes; all inputs are copied values. @thread Owner-thread mutations; independent instances can run concurrently. No callbacks. Geometry is transient, deterministic within floating-point tolerance (1e-5 relative). Target resolution, visibility, material, depth testing and upload belong to the caller. 更多...

#include <ArrowGenerator.h>

Public 成员函数

Result< void > setEndpoints (float ax, float ay, float az, float bx, float by, float bz)
 Set finite world-space endpoints; failure preserves previous endpoints.
 
Result< void > setBend (float x, float y, float z)
 Set quadratic Bezier control offset from the A/B midpoint; zero gives a straight line.
 
Result< void > setMode (std::string_view mode)
 Choose "2d" (XY ribbon), "3d" (closed tube/cone), or "flat" (beveled XY slab).
 
Result< void > setSize (float shaftWidth, float headWidth, float headLength)
 Set positive full shaft width, full head width and head length, each at most 1e6.
 
Result< void > setBevel (float thickness, float radius, int segments)
 Configure the flat mode's thin extrusion and rounded rim.
 
Result< void > setFlatProfile (std::string_view profile)
 Select flat geometry's uniform outline or tapered, softly rounded flowing profile.
 
Result< void > setHeadThicknessScale (float scale)
 Set the flat arrow head's thickness relative to its shaft, with a short shoulder ramp.
 
Result< void > setResolution (int curveSegments, int radialSides)
 Set tessellation budgets; failure preserves state.
 
Result< MeshBuild > buildMeshResult () const
 Build a new owning mesh without changing this builder or any previously built mesh.
 

详细描述

CPU geometry builder for A-to-B selection indicators, independent of object lifetime. @ownership Caller owns the builder and returned meshes; all inputs are copied values. @thread Owner-thread mutations; independent instances can run concurrently. No callbacks. Geometry is transient, deterministic within floating-point tolerance (1e-5 relative). Target resolution, visibility, material, depth testing and upload belong to the caller.

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

成员函数说明

◆ buildMeshResult()

Result< MeshBuild > eve::procgen::ArrowGenerator::buildMeshResult ( ) const

Build a new owning mesh without changing this builder or any previously built mesh.

返回
InvalidArgument for a reversed curve, a non-XY 2d path, or a path too short for the head. The head tip is exactly B in every mode; flat geometry tapers width and thickness to one geometric apex. Shaft starts at A. Tube/ribbon UV u follows normalized sampled arc length; flat UVs are per face. @cost Tube/ribbon CPU work is linear in curve segments times radial sides. Flat bevels use quadratic contour validation and up to cubic cap triangulation in contour vertices; reuse the mesh until endpoints or style change, and coalesce pointer updates before building/uploading.

在文件 ArrowGenerator.cpp 第 455 行定义.

引用了 a, angle, b, chord, end, eve::Result< T >::failure(), index, eve::procgen::raster_detail::invalid(), length, mesh, mid, normal, normals, offset, p, point, points, radius, reference, result, sides, eve::Result< T >::success(), t, triangle, unit , 以及 weight.

◆ setBend()

Result< void > eve::procgen::ArrowGenerator::setBend ( float  x,
float  y,
float  z 
)

Set quadratic Bezier control offset from the A/B midpoint; zero gives a straight line.

参数
xControl offset x.
yControl offset y.
zControl offset z.
返回
InvalidArgument for non-finite or out-of-range offsets; otherwise success.

在文件 ArrowGenerator.cpp 第 410 行定义.

引用了 eve::Result< T >::failure(), eve::procgen::raster_detail::invalid(), eve::Result< T >::success(), valid, value, x, y , 以及 z.

◆ setBevel()

Result< void > eve::procgen::ArrowGenerator::setBevel ( float  thickness,
float  radius,
int  segments 
)

Configure the flat mode's thin extrusion and rounded rim.

参数
thicknessFull Z thickness, greater than twice radius and at most 1e6.
radiusBevel radius, at least 1e-5; build also requires less than one quarter shaft width.
segmentsRound corner and bevel subdivisions [2,12].
返回
InvalidArgument for invalid settings; failure preserves previous state.

在文件 ArrowGenerator.cpp 第 441 行定义.

引用了 eve::Result< T >::failure(), eve::procgen::raster_detail::invalid(), radius, segments, eve::Result< T >::success(), thickness , 以及 valid.

◆ setEndpoints()

Result< void > eve::procgen::ArrowGenerator::setEndpoints ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz 
)

Set finite world-space endpoints; failure preserves previous endpoints.

参数
axA x.
ayA y.
azA z.
bxB x.
byB y.
bzB z.
返回
InvalidArgument for coincident endpoints or coordinates outside +/-1e6.

在文件 ArrowGenerator.cpp 第 403 行定义.

引用了 a, b, eve::Result< T >::failure(), eve::procgen::raster_detail::invalid(), length, eve::Result< T >::success() , 以及 valid.

◆ setFlatProfile()

Result< void > eve::procgen::ArrowGenerator::setFlatProfile ( std::string_view  profile)

Select flat geometry's uniform outline or tapered, softly rounded flowing profile.

参数
profile"uniform" (default) or "flowing"; affects flat mode only. Flowing tapers the tail to 8% of nominal neck width/thickness, adds up to 35% face crowning, and uses angle-weighted smooth normals with a 75-degree crease policy.
返回
InvalidArgument for an unknown name; failure preserves prior state.

在文件 ArrowGenerator.cpp 第 431 行定义.

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

◆ setHeadThicknessScale()

Result< void > eve::procgen::ArrowGenerator::setHeadThicknessScale ( float  scale)

Set the flat arrow head's thickness relative to its shaft, with a short shoulder ramp.

参数
scaleMultiplier [1,4]; 1 preserves uniform thickness. Ignored by 2d/3d modes.
返回
InvalidArgument for non-finite or out-of-range input; failure preserves prior state.

在文件 ArrowGenerator.cpp 第 436 行定义.

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

◆ setMode()

Result< void > eve::procgen::ArrowGenerator::setMode ( std::string_view  mode)

Choose "2d" (XY ribbon), "3d" (closed tube/cone), or "flat" (beveled XY slab).

参数
modeCase-sensitive mode name.
返回
InvalidArgument for an unknown mode, preserving previous state.

在文件 ArrowGenerator.cpp 第 416 行定义.

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

◆ setResolution()

Result< void > eve::procgen::ArrowGenerator::setResolution ( int  curveSegments,
int  radialSides 
)

Set tessellation budgets; failure preserves state.

参数
curveSegmentsCurve subdivisions [2,256].
radialSidesRadial sides [3,64], unused by 2d mode.
返回
InvalidArgument for out-of-budget resolution; otherwise success.

在文件 ArrowGenerator.cpp 第 449 行定义.

引用了 eve::Result< T >::failure(), eve::procgen::raster_detail::invalid(), segments, sides , 以及 eve::Result< T >::success().

◆ setSize()

Result< void > eve::procgen::ArrowGenerator::setSize ( float  shaftWidth,
float  headWidth,
float  headLength 
)

Set positive full shaft width, full head width and head length, each at most 1e6.

参数
shaftWidthFull shaft width, at least 1e-5.
headWidthFull head width, larger than shaftWidth.
headLengthAxial head length, at least 1e-5.
返回
InvalidArgument unless head width exceeds shaft width; failure preserves state.

在文件 ArrowGenerator.cpp 第 422 行定义.

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


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