载入中...
搜索中...
未找到
eve::building::HeightfieldSurface类 参考final

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()

const Config & eve::building::HeightfieldSurface::config ( ) const
inline

Return the immutable construction configuration.

在文件 HeightfieldSurface.h 第 54 行定义.

◆ create()

eve::Result< std::shared_ptr< const HeightfieldSurface > > eve::building::HeightfieldSurface::create ( Config  config,
std::vector< float >  samples 
)
static

Validate and take ownership of an immutable heightfield.

参数
configDimensions, plane-space transform and stable surface identity.
samplesRow-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.

参数
worldSupplies whether plane coordinates map to world XY or XZ.
planeXFirst grid-plane coordinate.
planeYSecond 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.


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