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

Uniform grid over strand roots for CPU frustum culling. 更多...

#include <ClusterGrid.h>

Public 成员函数

Result< void > build (const StrandsDatas &strands, float cellSize)
 Build clusters from validated strands.
 
void clear ()
 
size_t clusterCount () const
 Cluster count.
 
const HairCluster * clusterAt (size_t index) const
 Cluster at.
 
Result< std::vector< uint32_t > > cullClusters (const float *viewProj16) const
 Frustum-cull clusters against a column-major view-projection matrix.
 
Result< std::vector< uint32_t > > collectCurveIndices (const std::vector< uint32_t > &clusterIndices) const
 Collect unique curve indices from the given clusters (sorted ascending).
 
void computeBounds (glm::vec3 &outMin, glm::vec3 &outMax) const
 Overall AABB of all clusters; empty grid → zero box at origin.
 

详细描述

Uniform grid over strand roots for CPU frustum culling.

Clusters are built from root positions hashed into cells of cellSize. Each cluster AABB covers all points of the curves assigned to that cell.

@thread Affine to the caller; not synchronized. @reentrancy Does not invoke callbacks.

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

成员函数说明

◆ build()

Result< void > eve::graphics::hair::ClusterGrid::build ( const StrandsDatas &  strands,
float  cellSize 
)

Build clusters from validated strands.

参数
cellSizeWorld-space cell edge length; must be positive and finite.

在文件 ClusterGrid.cpp 第 74 行定义.

引用了 eve::graphics::hair::HairCluster::aabbMax, eve::graphics::hair::HairCluster::aabbMin, clear(), eve::graphics::hair::HairCluster::curveIndices, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, key, ok, p, root, strands , 以及 eve::Result< T >::success().

◆ clear()

void eve::graphics::hair::ClusterGrid::clear ( )

在文件 ClusterGrid.cpp 第 124 行定义.

被这些函数引用 build().

◆ clusterAt()

const HairCluster * eve::graphics::hair::ClusterGrid::clusterAt ( size_t  index) const

Cluster at.

在文件 ClusterGrid.cpp 第 126 行定义.

引用了 index.

◆ clusterCount()

size_t eve::graphics::hair::ClusterGrid::clusterCount ( ) const
inline

Cluster count.

在文件 ClusterGrid.h 第 45 行定义.

◆ collectCurveIndices()

Result< std::vector< uint32_t > > eve::graphics::hair::ClusterGrid::collectCurveIndices ( const std::vector< uint32_t > &  clusterIndices) const

Collect unique curve indices from the given clusters (sorted ascending).

在文件 ClusterGrid.cpp 第 158 行定义.

引用了 eve::Diagnostic::error() , 以及 eve::InvalidArgument.

◆ computeBounds()

void eve::graphics::hair::ClusterGrid::computeBounds ( glm::vec3 &  outMin,
glm::vec3 &  outMax 
) const

Overall AABB of all clusters; empty grid → zero box at origin.

在文件 ClusterGrid.cpp 第 175 行定义.

◆ cullClusters()

Result< std::vector< uint32_t > > eve::graphics::hair::ClusterGrid::cullClusters ( const float *  viewProj16) const

Frustum-cull clusters against a column-major view-projection matrix.

参数
viewProj16Exactly 16 floats in glm::mat4 memory order.
返回
Visible cluster indices (stable ascending), or InvalidArgument.

在文件 ClusterGrid.cpp 第 131 行定义.

引用了 c, eve::Diagnostic::error(), frustum, eve::InvalidArgument , 以及 visible.


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