载入中...
搜索中...
未找到
eve::graphics::SparseVolumeTexture类 参考

Brick-sparse, pre-bakeable participating-media texture. 更多...

#include <SparseVolumeTexture.h>

Public 成员函数

void resize (int width, int height, int depth, int brickSize=8)
 Allocate a logical volume; bricks are created only for non-empty voxels.
 
void clear ()
 Clears .
 
int getWidth () const
 Returns the width.
 
int getHeight () const
 Returns the height.
 
int getDepth () const
 Returns the depth.
 
int getBrickSize () const
 Returns the brick size.
 
std::size_t getBrickCount () const
 Returns the brick count.
 
std::size_t getAllocatedVoxelCount () const
 Returns the allocated voxel count.
 
void setVoxel (int x, int y, int z, const FogFroxel &voxel)
 Store one voxel; all-zero voxels do not allocate a new brick.
 
FogFroxel getVoxel (int x, int y, int z) const
 Read one voxel; missing bricks return vacuum.
 
FogFroxel sample (float u, float v, float w) const
 Nearest sample using normalized coordinates.
 
void bake (const VolumeDensityGraph &graph, const glm::vec3 &worldMin, const glm::vec3 &worldMax, float extinctionScale, const glm::vec3 &albedo, float emptyThreshold=1e-5f, float time=0.f)
 Pre-bake a procedural graph into sparse bricks.
 
bool save (const std::string &path) const
 Save the deterministic EVSV v1 binary format.
 
bool load (const std::string &path)
 Load the deterministic EVSV v1 binary format, replacing current data.
 

详细描述

Brick-sparse, pre-bakeable participating-media texture.

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

成员函数说明

◆ bake()

void eve::graphics::SparseVolumeTexture::bake ( const VolumeDensityGraph &  graph,
const glm::vec3 &  worldMin,
const glm::vec3 &  worldMax,
float  extinctionScale,
const glm::vec3 &  albedo,
float  emptyThreshold = 1e-5f,
float  time = 0.f 
)

Pre-bake a procedural graph into sparse bricks.

在文件 SparseVolumeTexture.cpp 第 94 行定义.

引用了 albedo, clear(), eve::graphics::FogFroxel::extinction, extinction, graph, eve::graphics::FogFroxel::scattering, setVoxel(), time, x, y , 以及 z.

◆ clear()

void eve::graphics::SparseVolumeTexture::clear ( )

Clears .

在文件 SparseVolumeTexture.cpp 第 43 行定义.

被这些函数引用 bake().

◆ getAllocatedVoxelCount()

std::size_t eve::graphics::SparseVolumeTexture::getAllocatedVoxelCount ( ) const

Returns the allocated voxel count.

在文件 SparseVolumeTexture.cpp 第 45 行定义.

◆ getBrickCount()

std::size_t eve::graphics::SparseVolumeTexture::getBrickCount ( ) const
inline

Returns the brick count.

在文件 SparseVolumeTexture.h 第 34 行定义.

◆ getBrickSize()

int eve::graphics::SparseVolumeTexture::getBrickSize ( ) const
inline

Returns the brick size.

在文件 SparseVolumeTexture.h 第 32 行定义.

◆ getDepth()

int eve::graphics::SparseVolumeTexture::getDepth ( ) const
inline

Returns the depth.

在文件 SparseVolumeTexture.h 第 30 行定义.

◆ getHeight()

int eve::graphics::SparseVolumeTexture::getHeight ( ) const
inline

Returns the height.

在文件 SparseVolumeTexture.h 第 28 行定义.

◆ getVoxel()

FogFroxel eve::graphics::SparseVolumeTexture::getVoxel ( int  x,
int  y,
int  z 
) const

Read one voxel; missing bricks return vacuum.

在文件 SparseVolumeTexture.cpp 第 82 行定义.

引用了 found, x, y , 以及 z.

被这些函数引用 sample().

◆ getWidth()

int eve::graphics::SparseVolumeTexture::getWidth ( ) const
inline

Returns the width.

在文件 SparseVolumeTexture.h 第 26 行定义.

◆ load()

bool eve::graphics::SparseVolumeTexture::load ( const std::string &  path)

Load the deterministic EVSV v1 binary format, replacing current data.

在文件 SparseVolumeTexture.cpp 第 145 行定义.

引用了 depth, f, height, key, path, resize(), values , 以及 width.

◆ resize()

void eve::graphics::SparseVolumeTexture::resize ( int  width,
int  height,
int  depth,
int  brickSize = 8 
)

Allocate a logical volume; bricks are created only for non-empty voxels.

在文件 SparseVolumeTexture.cpp 第 35 行定义.

引用了 depth, height , 以及 width.

被这些函数引用 load().

◆ sample()

FogFroxel eve::graphics::SparseVolumeTexture::sample ( float  u,
float  v,
float  w 
) const

Nearest sample using normalized coordinates.

在文件 SparseVolumeTexture.cpp 第 88 行定义.

引用了 getVoxel(), u, v , 以及 w.

被这些函数引用 eve::graphics::AtmosphereVolume::injectSparseVolume().

◆ save()

bool eve::graphics::SparseVolumeTexture::save ( const std::string &  path) const

Save the deterministic EVSV v1 binary format.

在文件 SparseVolumeTexture.cpp 第 117 行定义.

引用了 depth, f, height, key, path, values , 以及 width.

◆ setVoxel()

void eve::graphics::SparseVolumeTexture::setVoxel ( int  x,
int  y,
int  z,
const FogFroxel &  voxel 
)

Store one voxel; all-zero voxels do not allocate a new brick.

在文件 SparseVolumeTexture.cpp 第 68 行定义.

引用了 found, key, x, y , 以及 z.

被这些函数引用 bake().


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