Immutable world-space triangle mesh accelerated for placement-surface projection. 更多...
#include <StaticMeshSurface.h>
类 | |
| struct | Config |
| Immutable identity, hit policy and metadata for one static mesh snapshot. 更多... | |
Public 类型 | |
| enum class | HitSelection { Highest , Lowest , ClosestToReference } |
| Deterministic policy for multiple triangles under one plane coordinate. 更多... | |
Public 成员函数 | |
| eve::Result< PlacementSystem::PlacementHit > | sample (const PlacementWorld &world, float planeX, float planeY) const |
| Project one grid-plane coordinate through the BVH and sample the selected triangle. | |
| const Config & | config () const |
| Return the immutable construction configuration. | |
| size_t | triangleCount () const |
| Number of source triangles indexed by the BVH. | |
| size_t | nodeCount () const |
| Number of BVH nodes, including leaves. | |
静态 Public 成员函数 | |
| static eve::Result< std::shared_ptr< const StaticMeshSurface > > | create (Config config, std::vector< float > vertices, std::vector< uint32_t > indices, std::vector< float > normals={}) |
| Validate world-space triangle data and build an owning median-split BVH. | |
详细描述
Immutable world-space triangle mesh accelerated for placement-surface projection.
在文件 StaticMeshSurface.h 第 16 行定义.
成员枚举类型说明
◆ HitSelection
|
strong |
Deterministic policy for multiple triangles under one plane coordinate.
| 枚举值 | |
|---|---|
| Highest | |
| Lowest | |
| ClosestToReference | |
在文件 StaticMeshSurface.h 第 19 行定义.
成员函数说明
◆ config()
|
inline |
Return the immutable construction configuration.
在文件 StaticMeshSurface.h 第 56 行定义.
◆ create()
|
static |
Validate world-space triangle data and build an owning median-split BVH.
- 参数
-
config Stable identity, hit selection and build settings. vertices Packed finite XYZ positions. indices Three valid vertex indices per non-degenerate triangle. normals Optional packed finite XYZ vertex normals matching vertices exactly.
- 返回
- An immutable shareable surface, or a structured failure with no publication.
在文件 StaticMeshSurface.cpp 第 74 行定义.
引用了 index, indices, eve::InvalidArgument, eve::building::StaticMeshSurface::Config::leafTriangleCount, normals, offset, points, eve::building::StaticMeshSurface::Config::referenceHeight, eve::building::StaticMeshSurface::Config::surfaceId, triangle, value, vertexCount , 以及 vertices.
◆ nodeCount()
|
inline |
Number of BVH nodes, including leaves.
在文件 StaticMeshSurface.h 第 60 行定义.
◆ sample()
| eve::Result< PlacementSystem::PlacementHit > eve::building::StaticMeshSurface::sample | ( | const PlacementWorld & | world, |
| float | planeX, | ||
| float | planeY | ||
| ) | const |
Project one grid-plane coordinate through the BVH and sample the selected triangle.
- 参数
-
world Grid-plane configuration used to choose XY or XZ projection. planeX First coordinate on the configured grid plane. planeY Second coordinate on the configured grid plane.
- 返回
- A hit with stable source triangle id, or NotFound when no projected face exists. @thread Safe to call concurrently after construction. No callbacks are invoked.
在文件 StaticMeshSurface.cpp 第 192 行定义.
引用了 a, b, c, distance, found, height, hit, inside, eve::InvalidArgument, n, node, normal, eve::NotFound, offset, p, pending, eve::Result< T >::success(), tangent, triangle, world , 以及 eve::building::PlacementSystem::PlacementHit::worldX.
◆ triangleCount()
|
inline |
Number of source triangles indexed by the BVH.
在文件 StaticMeshSurface.h 第 58 行定义.
该类的文档由以下文件生成:
- src/modules/building/StaticMeshSurface.h
- src/modules/building/StaticMeshSurface.cpp