Immutable regularly sampled heightfield usable as an XY or XZ placement surface. 更多...
#include <HeightfieldSurface.h>
类 | |
| struct | Config |
| Owning construction data. Samples are row-major plane-axis heights. 更多... | |
Public 成员函数 | |
| eve::Result< PlacementSystem::PlacementHit > | sample (const PlacementWorld &world, float planeX, float planeY) const |
| Bilinearly sample height and its continuous local differential frame. | |
| const Config & | config () const |
| Return the immutable construction configuration. | |
静态 Public 成员函数 | |
| static eve::Result< std::shared_ptr< const HeightfieldSurface > > | create (Config config, std::vector< float > samples) |
| Validate and take ownership of an immutable heightfield. | |
详细描述
Immutable regularly sampled heightfield usable as an XY or XZ placement surface.
在文件 HeightfieldSurface.h 第 16 行定义.
成员函数说明
◆ config()
|
inline |
Return the immutable construction configuration.
在文件 HeightfieldSurface.h 第 54 行定义.
◆ create()
|
static |
Validate and take ownership of an immutable heightfield.
- 参数
-
config Dimensions, plane-space transform and stable surface identity. samples Row-major samples; exactly width * height finite values are required.
- 返回
- A shareable immutable surface or a structured validation failure.
在文件 HeightfieldSurface.cpp 第 26 行定义.
引用了 height, eve::building::HeightfieldSurface::Config::height, eve::building::HeightfieldSurface::Config::heightOffset, eve::building::HeightfieldSurface::Config::heightScale, eve::InvalidArgument, eve::building::HeightfieldSurface::Config::originX, eve::building::HeightfieldSurface::Config::originY, eve::building::HeightfieldSurface::Config::spacingX, eve::building::HeightfieldSurface::Config::spacingY, eve::building::HeightfieldSurface::Config::surfaceId, width , 以及 eve::building::HeightfieldSurface::Config::width.
◆ sample()
| eve::Result< PlacementSystem::PlacementHit > eve::building::HeightfieldSurface::sample | ( | const PlacementWorld & | world, |
| float | planeX, | ||
| float | planeY | ||
| ) | const |
Bilinearly sample height and its continuous local differential frame.
- 参数
-
world Supplies whether plane coordinates map to world XY or XZ. planeX First grid-plane coordinate. planeY Second grid-plane coordinate.
- 返回
- An owning hit, or NotFound when the coordinate is outside the heightfield. @thread Safe to call concurrently after construction. No callbacks are invoked.
在文件 HeightfieldSurface.cpp 第 61 行定义.
引用了 at, dx, dy, hit, eve::InvalidArgument, eve::NotFound, eve::Result< T >::success(), u, v, world, eve::building::PlacementSystem::PlacementHit::worldX, x , 以及 y.
该类的文档由以下文件生成:
- src/modules/building/HeightfieldSurface.h
- src/modules/building/HeightfieldSurface.cpp