载入中...
搜索中...
未找到
eve::procgen::PcgMeshLodProfile类 参考

Mutable value profile for at most four native renderer LOD levels. 更多...

#include <PcgMeshLod.h>

Public 成员函数

Result< void > appendLevel (float transitionHeight, float fadeWidth, float quality, bool combineMeshes=false, bool combineSubMeshes=false)
 Append one level after validating its scalar ranges.
 
Result< void > setLevelRendererState (int index, int skinQuality, int shadowCastingMode, bool receiveShadows, int motionVectorMode, bool skinnedMotionVectors, int lightProbeUsage, int reflectionProbeUsage)
 Replace one level's renderer policy after validating every Pcg enum value.
 
int getLevelRendererState (int index, int field) const noexcept
 Return one renderer state field (0..6), or -1 for invalid input.
 
Result< void > setFadePolicy (int fadeMode, bool animateCrossFading, float animationDuration=0.5F)
 Configure Unity LODFadeMode (0 None, 1 SpeedTree, 2 CrossFade) and optional time animation.
 
int getFadeMode () const noexcept
 Return configured Unity LODFadeMode.
 
bool getAnimateCrossFading () const noexcept
 Return whether transitions advance from injected dt.
 
float getCrossFadeAnimationDuration () const noexcept
 Return time-driven transition duration in seconds.
 
void clear () noexcept
 Remove all level records.
 
int getLevelCount () const noexcept
 Return the number of configured levels.
 
const PcgMeshLodLevel * levelAt (int index) const noexcept
 Return an immutable level, or null for an invalid index. @ownership The profile retains ownership. @lifetime Valid until the next profile mutation or destruction.
 
const std::vector< PcgMeshLodLevel > & levels () const noexcept
 Borrow all levels for synchronous native compilation. @ownership The profile retains ownership. @lifetime The reference is invalidated by profile mutation or destruction.
 

详细描述

Mutable value profile for at most four native renderer LOD levels.

The profile owns its level records. It has no renderer, mesh, callback or thread affinity and callers must serialize mutation. Level transitions must be strictly descending when compiled.

在文件 PcgMeshLod.h 第 97 行定义.

成员函数说明

◆ appendLevel()

Result< void > eve::procgen::PcgMeshLodProfile::appendLevel ( float  transitionHeight,
float  fadeWidth,
float  quality,
bool  combineMeshes = false,
bool  combineSubMeshes = false 
)

◆ clear()

void eve::procgen::PcgMeshLodProfile::clear ( )
inlinenoexcept

Remove all level records.

在文件 PcgMeshLod.h 第 119 行定义.

◆ getAnimateCrossFading()

bool eve::procgen::PcgMeshLodProfile::getAnimateCrossFading ( ) const
inlinenoexcept

Return whether transitions advance from injected dt.

在文件 PcgMeshLod.h 第 115 行定义.

◆ getCrossFadeAnimationDuration()

float eve::procgen::PcgMeshLodProfile::getCrossFadeAnimationDuration ( ) const
inlinenoexcept

Return time-driven transition duration in seconds.

在文件 PcgMeshLod.h 第 117 行定义.

◆ getFadeMode()

int eve::procgen::PcgMeshLodProfile::getFadeMode ( ) const
inlinenoexcept

Return configured Unity LODFadeMode.

在文件 PcgMeshLod.h 第 113 行定义.

◆ getLevelCount()

int eve::procgen::PcgMeshLodProfile::getLevelCount ( ) const
inlinenoexcept

Return the number of configured levels.

在文件 PcgMeshLod.h 第 121 行定义.

◆ getLevelRendererState()

int eve::procgen::PcgMeshLodProfile::getLevelRendererState ( int  index,
int  field 
) const
noexcept

Return one renderer state field (0..6), or -1 for invalid input.

在文件 PcgMeshLod.cpp 第 166 行定义.

引用了 index, level , 以及 state.

◆ levelAt()

const PcgMeshLodLevel * eve::procgen::PcgMeshLodProfile::levelAt ( int  index) const
noexcept

Return an immutable level, or null for an invalid index. @ownership The profile retains ownership. @lifetime Valid until the next profile mutation or destruction.

在文件 PcgMeshLod.cpp 第 194 行定义.

引用了 index.

◆ levels()

const std::vector< PcgMeshLodLevel > & eve::procgen::PcgMeshLodProfile::levels ( ) const
inlinenoexcept

Borrow all levels for synchronous native compilation. @ownership The profile retains ownership. @lifetime The reference is invalidated by profile mutation or destruction.

在文件 PcgMeshLod.h 第 129 行定义.

被这些函数引用 eve::procgen::buildPcgCombinedMeshLodsInto().

◆ setFadePolicy()

Result< void > eve::procgen::PcgMeshLodProfile::setFadePolicy ( int  fadeMode,
bool  animateCrossFading,
float  animationDuration = 0.5F 
)

Configure Unity LODFadeMode (0 None, 1 SpeedTree, 2 CrossFade) and optional time animation.

在文件 PcgMeshLod.cpp 第 182 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ setLevelRendererState()

Result< void > eve::procgen::PcgMeshLodProfile::setLevelRendererState ( int  index,
int  skinQuality,
int  shadowCastingMode,
bool  receiveShadows,
int  motionVectorMode,
bool  skinnedMotionVectors,
int  lightProbeUsage,
int  reflectionProbeUsage 
)

Replace one level's renderer policy after validating every Pcg enum value.

在文件 PcgMeshLod.cpp 第 142 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, lightProbeUsage, state , 以及 eve::Result< T >::success().


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