载入中...
搜索中...
未找到
eve::math 命名空间参考

命名空间

namespace  steering
 

类

struct  ConvexHull2D
 Self-contained 2D hull; vertices are CCW, with no repeated closing point. 更多...
 
struct  ConvexHull3D
 Self-contained 3D hull; volume triangles face outward. 更多...
 
class  Mat4
 Column-major 4x4 matrix wrapping glm::mat4. 更多...
 
class  Math
 Math module — glm-backed vectors/matrices, noise, bezier, random. Script: math <- eve.Math(); 更多...
 
class  Vec2
 2D float vector (script-facing math module value). 更多...
 
class  Vec3
 3D float vector (script-facing math module value). 更多...
 

类型定义

using HullPoint2 = std::array< float, 2 >
 Owned XY coordinates; no script object or module lifetime required.
 
using HullPoint3 = std::array< float, 3 >
 Owned XYZ coordinates; no script object or module lifetime required.
 
using HullTriangle = std::array< std::size_t, 3 >
 Triangle indices into the returned vertex array.
 

枚举

enum class  HullDimension {
  Empty , Point , Segment , Plane ,
  Volume
}
 Affine dimension of a successful hull, including degenerate inputs. 更多...
 

函数

float smoothMax (float a, float b, float width)
 C1 polynomial maximum for blending two height fields.
 
Result< ConvexHull2D > convexHull2D (std::span< const HullPoint2 > points)
 Andrew monotone-chain hull; removes exact duplicates and collinear edge interiors.
 
Result< ConvexHull3D > convexHull3D (std::span< const HullPoint3 > points, double tolerance=1e-10)
 Incremental 3D hull with outward triangles and compact vertex indices.
 
 Module_IMPL (Math, new Math())
 

类型定义说明

◆ HullPoint2

using eve::math::HullPoint2 = typedef std::array<float, 2>

Owned XY coordinates; no script object or module lifetime required.

在文件 ConvexHull.h 第 14 行定义.

◆ HullPoint3

using eve::math::HullPoint3 = typedef std::array<float, 3>

Owned XYZ coordinates; no script object or module lifetime required.

在文件 ConvexHull.h 第 16 行定义.

◆ HullTriangle

using eve::math::HullTriangle = typedef std::array<std::size_t, 3>

Triangle indices into the returned vertex array.

在文件 ConvexHull.h 第 18 行定义.

枚举类型说明

◆ HullDimension

enum class eve::math::HullDimension
strong

Affine dimension of a successful hull, including degenerate inputs.

枚举值
Empty 
Point 
Segment 
Plane 
Volume 

在文件 ConvexHull.h 第 21 行定义.

函数说明

◆ convexHull2D()

EVENGINE_API_FOUNDATION Result< ConvexHull2D > eve::math::convexHull2D ( std::span< const HullPoint2 >  points)

Andrew monotone-chain hull; removes exact duplicates and collinear edge interiors.

参数
pointsFinite XY values, borrowed only during this call.
返回
Owned hull, or InvalidArgument for non-finite coordinates. Collinear input returns sorted endpoints; singleton and empty input are successful. @ownership Result owns all output; input is neither changed nor retained. @thread Stateless, callable on any thread with immutable input; invokes no callbacks. @cost O(n log n) time and O(n) memory per point set; cache the hull for reuse.
注解
Predicates use double precision, not exact arithmetic.

在文件 ConvexHull.cpp 第 59 行定义.

引用了 eve::math::ConvexHull2D::dimension, Empty, finite, p, Plane, Point, points, Segment, eve::Result< T >::success() , 以及 eve::math::ConvexHull2D::vertices.

◆ convexHull3D()

EVENGINE_API_FOUNDATION Result< ConvexHull3D > eve::math::convexHull3D ( std::span< const HullPoint3 >  points,
double  tolerance = 1e-10 
)

Incremental 3D hull with outward triangles and compact vertex indices.

参数
pointsFinite XYZ values, borrowed only during this call.
toleranceDistance relative to the largest bounding-box extent; finite, nonnegative and less than one. Coordinates are normalized internally.
返回
Owned hull or InvalidArgument. Empty/point/segment have no faces. Plane vertices form a boundary cycle with a triangle fan (orientation is unspecified). Volume faces retain coplanar triangulation; edge-interior vertices may remain. @ownership Result owns all output; input is neither changed nor retained. @thread Stateless, callable on any thread with immutable input; invokes no callbacks. @cost Worst-case O(n^2 log n) time and O(n) memory per point set; cache results for reuse.
注解
Sorted processing is deterministic for identical input sets on one platform. Floating-point predicates are approximate; near-degenerate features within tolerance may be omitted. No exact topology or cross-platform bitwise parity is promised.

在文件 ConvexHull.cpp 第 73 行定义.

引用了 a, b, eve::math::ConvexHull3D::dimension, Empty, finite, input, p, Point, scale, eve::Result< T >::success() , 以及 eve::math::ConvexHull3D::vertices.

◆ Module_IMPL()

eve::math::Module_IMPL ( Math  ,
new   Math() 
)

◆ smoothMax()

float eve::math::smoothMax ( float  a,
float  b,
float  width 
)
inline

C1 polynomial maximum for blending two height fields.

参数
aFinite first height.
bFinite second height, in the same coordinate system and units.
widthFinite nonnegative height-difference band; zero selects ordinary max.
返回
max(a,b) outside the band, otherwise max(a,b) + width*h*h/4, where h = 1-abs(a-b)/width. Equal heights rise by width/4. Overflow returns +infinity. @thread Stateless and thread-safe; retains nothing and invokes no callbacks.
注解
Constant work per sample, no allocations or RNG. Symmetric but not associative. Results are deterministic on one toolchain; compare across platforms with tolerance. Preconditions are checked with EV_PARAM_CHECK in assertion-enabled builds.

在文件 SmoothMax.h 第 24 行定义.

引用了 a, b, EV_PARAM_CHECK, h, result, top , 以及 width.

被这些函数引用 eve::procgen::applyTerrainStamp(), eve::math::Math::smoothMax() , 以及 eve::math::Math::~Math().