载入中...
搜索中...
未找到
eve::avatar::Appearance类 参考

Renderer-independent character appearance authoring and runtime state. Owns its validated definition, parameters, wardrobe selections and bounded history. All calls are owner-thread affine, synchronous and callback-free. Inputs are copied; returned Values own their storage. No renderer, skeleton or equipment pointers are retained. Definition changes reset history; failed changes preserve all observable state. 更多...

#include <Appearance.h>

Public 成员函数

Result< void > configure (const Value &definition)
 Validate and replace a complete eve.appearance.definition v1 document. @cost Linear in document size plus reference validation, once per asset load.
 
Result< void > apply (const Value &patch)
 Atomically patch parameters and selections; reject unknown ids, conflicts and out-of-range values. Equal patches do not create history. Up to 64 previous states are retained. @cost Copies current state and validates wardrobe pairs, once per user edit, never per frame.
 
Result< void > restore (const Value &snapshot)
 Restore an exact eve.appearance.state v1 snapshot for the currently loaded profile. Unknown fields, missing values, versions and foreign profile ids are rejected atomically. @cost Linear in snapshot size plus wardrobe validation, once per restore.
 
Result< void > undo ()
 Undo the last applied edit; NotFound when history is empty.
 
Result< void > redo ()
 Redo the last undone edit; NotFound when history is empty.
 
bool canUndo () const
 Query whether an undo state exists, without evaluating anything.
 
bool canRedo () const
 Query whether a redo state exists, without evaluating anything.
 
Value snapshot () const
 Return an owning versioned snapshot of authoritative parameter and selection state. @cost Copies all current values once per save or inspector refresh.
 
Value evaluate () const
 Evaluate additive channels and multi-input corrective drivers, and derive wardrobe visibility. Channels are ordered by id; driver activation is clamped linear interpolation from start to end. Inputs in a driver multiply, drivers on the same output add. No state is mutated. @cost Linear in driver inputs plus selected wardrobe parts, once per changed appearance.
 
Result< void > applyMorphWeights (graphics::Mesh &mesh, std::string_view prefix) const
 Validate all driven morph names before writing weights to a borrowed mesh. Only outputs beginning with prefix are applied, with the prefix removed from morph names. Unrelated expression morphs remain unchanged. Graphics::bakeMeshMorph uploads the result. No references survive the call. Render-thread only, no callbacks. Missing targets leave the mesh unchanged. @cost Evaluates all drivers and checks selected target names, once per changed appearance.
 

详细描述

Renderer-independent character appearance authoring and runtime state. Owns its validated definition, parameters, wardrobe selections and bounded history. All calls are owner-thread affine, synchronous and callback-free. Inputs are copied; returned Values own their storage. No renderer, skeleton or equipment pointers are retained. Definition changes reset history; failed changes preserve all observable state.

在文件 Appearance.h 第 27 行定义.

成员函数说明

◆ apply()

Result< void > eve::avatar::Appearance::apply ( const Value &  patch)

Atomically patch parameters and selections; reject unknown ids, conflicts and out-of-range values. Equal patches do not create history. Up to 64 previous states are retained. @cost Copies current state and validates wardrobe pairs, once per user edit, never per frame.

在文件 Appearance.cpp 第 163 行定义.

引用了 error, eve::Value::find(), key, number, text , 以及 values.

被这些函数引用 eve::avatar::exposeAppearance() , 以及 restore().

◆ applyMorphWeights()

Result< void > eve::avatar::Appearance::applyMorphWeights ( graphics::Mesh &  mesh,
std::string_view  prefix 
) const

Validate all driven morph names before writing weights to a borrowed mesh. Only outputs beginning with prefix are applied, with the prefix removed from morph names. Unrelated expression morphs remain unchanged. Graphics::bakeMeshMorph uploads the result. No references survive the call. Render-thread only, no callbacks. Missing targets leave the mesh unchanged. @cost Evaluates all drivers and checks selected target names, once per changed appearance.

在文件 AppearanceMesh.cpp 第 5 行定义.

引用了 channels, eve::Diagnostic::error(), evaluate(), eve::Result< T >::failure(), mesh, name, eve::NotFound, eve::Result< T >::success() , 以及 value.

被这些函数引用 eve::avatar::exposeAppearance().

◆ canRedo()

bool eve::avatar::Appearance::canRedo ( ) const
inline

Query whether a redo state exists, without evaluating anything.

在文件 Appearance.h 第 51 行定义.

被这些函数引用 eve::avatar::exposeAppearance().

◆ canUndo()

bool eve::avatar::Appearance::canUndo ( ) const
inline

Query whether an undo state exists, without evaluating anything.

在文件 Appearance.h 第 49 行定义.

被这些函数引用 eve::avatar::exposeAppearance().

◆ configure()

Result< void > eve::avatar::Appearance::configure ( const Value &  definition)

Validate and replace a complete eve.appearance.definition v1 document. @cost Linear in document size plus reference validation, once per asset load.

返回
InvalidArgument on malformed schemas, references, ranges or defaults.

在文件 Appearance.cpp 第 63 行定义.

引用了 error, id, input, name, number, p, parameter, second, eve::Result< T >::success(), text , 以及 valid.

被这些函数引用 eve::avatar::exposeAppearance().

◆ evaluate()

Value eve::avatar::Appearance::evaluate ( ) const

Evaluate additive channels and multi-input corrective drivers, and derive wardrobe visibility. Channels are ordered by id; driver activation is clamped linear interpolation from start to end. Inputs in a driver multiply, drivers on the same output add. No state is mutated. @cost Linear in driver inputs plus selected wardrobe parts, once per changed appearance.

在文件 Appearance.cpp 第 225 行定义.

引用了 eve::Array, channels, input, key, name, eve::Object, parts, slot, value , 以及 visible.

被这些函数引用 applyMorphWeights() , 以及 eve::avatar::exposeAppearance().

◆ redo()

Result< void > eve::avatar::Appearance::redo ( )

Redo the last undone edit; NotFound when history is empty.

在文件 Appearance.cpp 第 207 行定义.

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

被这些函数引用 eve::avatar::exposeAppearance().

◆ restore()

Result< void > eve::avatar::Appearance::restore ( const Value &  snapshot)

Restore an exact eve.appearance.state v1 snapshot for the currently loaded profile. Unknown fields, missing values, versions and foreign profile ids are rejected atomically. @cost Linear in snapshot size plus wardrobe validation, once per restore.

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

引用了 apply(), error, eve::Object, parameters, snapshot() , 以及 text.

被这些函数引用 eve::avatar::exposeAppearance().

◆ snapshot()

Value eve::avatar::Appearance::snapshot ( ) const

Return an owning versioned snapshot of authoritative parameter and selection state. @cost Copies all current values once per save or inspector refresh.

在文件 Appearance.cpp 第 215 行定义.

引用了 key, eve::Object, parameters , 以及 value.

被这些函数引用 eve::avatar::exposeAppearance() , 以及 restore().

◆ undo()

Result< void > eve::avatar::Appearance::undo ( )

Undo the last applied edit; NotFound when history is empty.

在文件 Appearance.cpp 第 199 行定义.

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

被这些函数引用 eve::avatar::exposeAppearance().


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