Persistent runtime snapshot for one geometry-collection instance. 更多...
#include <GeometryCollectionSnapshot.h>
类 | |
| struct | BoneSnapshot |
| BoneSnapshot public API. 更多... | |
| struct | EdgeSnapshot |
| EdgeSnapshot public API. 更多... | |
Public 成员函数 | |
| eve::Result< void > | validate () const |
| Validate counts and numeric ranges. | |
| eve::Result< eve::Value > | toValue () const |
| Encode the complete canonical version-1 value. | |
静态 Public 成员函数 | |
| static eve::schema::SchemaDefinition | schemaDefinition () |
| Build the tooling schema that mirrors validate(). | |
| static eve::Result< void > | ensureSchemaRegistered () |
| Idempotently register version 1 in the process schema registry. | |
| static eve::Result< GeometryCollectionInstanceSnapshot > | fromValue (const eve::Value &value) |
| Decode and validate version 1 transactionally. | |
Public 属性 | |
| float | originX = 0.f |
| float | originY = 0.f |
| float | originZ = 0.f |
| std::int64_t | lastTick = 0 |
| std::uint64_t | sleepBatchRevision = 0 |
| std::vector< BoneSnapshot > | bones |
| std::vector< EdgeSnapshot > | edges |
静态 Public 属性 | |
| static constexpr std::string_view | SchemaId = "physics:geometry-collection-instance" |
| static constexpr std::uint32_t | SchemaVersion = 1 |
详细描述
Persistent runtime snapshot for one geometry-collection instance.
Schema id physics:geometry-collection-instance version 1. Captures bone states, edge strain/broken flags, and origin — not live PhysicsLink handles. Restore rebuilds body types from state against a live World3D.
Bone state uses the same integer encoding as BoneRuntimeState (Attached=0, Detached=1, Sleeping=2).
@ownership Owning value; never retains Body3D or World3D pointers.
在文件 GeometryCollectionSnapshot.h 第 28 行定义.
成员函数说明
◆ ensureSchemaRegistered()
|
static |
Idempotently register version 1 in the process schema registry.
在文件 GeometryCollectionSnapshot.cpp 第 235 行定义.
引用了 eve::Result< T >::failure(), eve::schema::SchemaRegistry::registerVersioned(), eve::schema::SchemaRegistry::resolve(), schemaDefinition(), SchemaId , 以及 eve::Result< T >::success().
被这些函数引用 fromValue() , 以及 eve::physics::Destruction::registerGeometryCollectionSchema().
◆ fromValue()
|
static |
Decode and validate version 1 transactionally.
在文件 GeometryCollectionSnapshot.cpp 第 243 行定义.
引用了 eve::Value::asString(), bone, bones, edge, edges, ensureSchemaRegistered(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Value::getIf(), eve::InvalidArgument, eve::Value::isString(), lastTick, number, originX, originY, originZ, ox, oy, SchemaId, sleepBatchRevision, eve::Result< T >::success(), eve::Unsupported, valid, validate() , 以及 value.
◆ schemaDefinition()
|
static |
Build the tooling schema that mirrors validate().
在文件 GeometryCollectionSnapshot.cpp 第 206 行定义.
引用了 eve::schema::SchemaDefinition::additionalProperties, eve::schema::SchemaDefinition::description, eve::schema::SchemaDefinition::fields, eve::schema::SchemaDefinition::id, name, required, SchemaId, SchemaVersion, eve::schema::SchemaDefinition::title, type, eve::editing::Value::type() , 以及 eve::schema::SchemaDefinition::version.
被这些函数引用 ensureSchemaRegistered().
◆ toValue()
| eve::Result< eve::Value > eve::physics::GeometryCollectionInstanceSnapshot::toValue | ( | ) | const |
Encode the complete canonical version-1 value.
在文件 GeometryCollectionSnapshot.cpp 第 166 行定义.
引用了 bone, bones, edge, edges, eve::Result< T >::failure(), lastTick, object, originX, originY, originZ, SchemaId, SchemaVersion, sleepBatchRevision, eve::Result< T >::success(), valid , 以及 validate().
◆ validate()
| eve::Result< void > eve::physics::GeometryCollectionInstanceSnapshot::validate | ( | ) | const |
Validate counts and numeric ranges.
在文件 GeometryCollectionSnapshot.cpp 第 126 行定义.
引用了 bone, bones, edge, edges, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, lastTick, originX, originY, originZ , 以及 eve::Result< T >::success().
被这些函数引用 eve::physics::GeometryCollectionInstance::captureSnapshot(), fromValue(), eve::physics::GeometryCollectionInstance::restoreSnapshot() , 以及 toValue().
类成员变量说明
◆ bones
| std::vector<BoneSnapshot> eve::physics::GeometryCollectionInstanceSnapshot::bones |
◆ edges
| std::vector<EdgeSnapshot> eve::physics::GeometryCollectionInstanceSnapshot::edges |
◆ lastTick
| std::int64_t eve::physics::GeometryCollectionInstanceSnapshot::lastTick = 0 |
◆ originX
| float eve::physics::GeometryCollectionInstanceSnapshot::originX = 0.f |
◆ originY
| float eve::physics::GeometryCollectionInstanceSnapshot::originY = 0.f |
◆ originZ
| float eve::physics::GeometryCollectionInstanceSnapshot::originZ = 0.f |
◆ SchemaId
|
staticconstexpr |
在文件 GeometryCollectionSnapshot.h 第 29 行定义.
被这些函数引用 ensureSchemaRegistered(), fromValue(), schemaDefinition() , 以及 toValue().
◆ SchemaVersion
|
staticconstexpr |
在文件 GeometryCollectionSnapshot.h 第 30 行定义.
被这些函数引用 schemaDefinition() , 以及 toValue().
◆ sleepBatchRevision
| std::uint64_t eve::physics::GeometryCollectionInstanceSnapshot::sleepBatchRevision = 0 |
该结构体的文档由以下文件生成:
- src/modules/physics/destruction/GeometryCollectionSnapshot.h
- src/modules/physics/destruction/GeometryCollectionSnapshot.cpp