Immutable cooked/authored geometry-collection asset. 更多...
#include <GeometryCollectionAsset.h>
Public 成员函数 | |
| eve::Result< void > | validate () const |
| Validate bone/edge topology and numeric ranges. | |
| eve::Result< eve::Value > | toValue () const |
| Encode the complete canonical version-2 value. | |
静态 Public 成员函数 | |
| static eve::schema::SchemaDefinition | schemaDefinition () |
| Build the tooling schema that mirrors validate(). | |
| static eve::Result< void > | ensureSchemaRegistered () |
| Idempotently register version 2 in the process schema registry. | |
| static eve::Result< GeometryCollectionAsset > | fromValue (const eve::Value &value) |
| Decode and validate version 2, or migrate version 1 (cluster fields = 0). | |
| static eve::Result< GeometryCollectionAsset > | makeWeldedBoxesFixture (float strainThreshold=1.f) |
| Build a two-box welded fixture used by tests and the smoke example. | |
| static eve::Result< GeometryCollectionAsset > | makeClusterPillarFixture (float interClusterStrain=0.8f) |
| Build a 2×3 anchored pillar with two cook clusters for demos. | |
Public 属性 | |
| std::vector< GeometryCollectionBone > | bones |
| std::vector< GeometryCollectionEdge > | edges |
静态 Public 属性 | |
| static constexpr std::string_view | SchemaId = "physics:geometry-collection" |
| static constexpr std::uint32_t | SchemaVersion = 2 |
| static constexpr std::uint32_t | SchemaVersionV1 = 1 |
详细描述
Immutable cooked/authored geometry-collection asset.
Version 2 adds clusterId/fractureLevel on bones. Version 1 documents migrate in fromValue (clusterId=0, fractureLevel=0). Unknown fields and unsupported versions are rejected; there is no silent downgrade.
在文件 GeometryCollectionAsset.h 第 48 行定义.
成员函数说明
◆ ensureSchemaRegistered()
|
static |
Idempotently register version 2 in the process schema registry.
在文件 GeometryCollectionAsset.cpp 第 269 行定义.
引用了 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 2, or migrate version 1 (cluster fields = 0).
Rejects unknown fields and unsupported versions; never partially publishes.
在文件 GeometryCollectionAsset.cpp 第 277 行定义.
引用了 eve::Value::asString(), bone, bones, edge, edges, ensureSchemaRegistered(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Value::getIf(), eve::InvalidArgument, eve::Value::isString(), SchemaId, SchemaVersionV1, eve::Result< T >::success(), eve::Unsupported, valid, validate() , 以及 value.
◆ makeClusterPillarFixture()
|
static |
Build a 2×3 anchored pillar with two cook clusters for demos.
Bottom bones are anchored. Intra-cluster edges are stronger than the inter-cluster welds so budgeted strain tends to split clusters first.
在文件 GeometryCollectionAsset.cpp 第 349 行定义.
引用了 a, b, bone, eve::physics::GeometryCollectionEdge::boneA, bones, edge, edges, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::physics::GeometryCollectionBone::halfExtentX, eve::InvalidArgument, level, eve::Result< T >::success(), valid , 以及 validate().
被这些函数引用 eve::physics::Destruction::makeClusterPillarFixture().
◆ makeWeldedBoxesFixture()
|
static |
Build a two-box welded fixture used by tests and the smoke example.
在文件 GeometryCollectionAsset.cpp 第 326 行定义.
引用了 eve::physics::GeometryCollectionEdge::boneA, bones, edge, edges, eve::Result< T >::failure(), eve::physics::GeometryCollectionBone::halfExtentX, left, eve::physics::GeometryCollectionBone::localX, right, eve::Result< T >::success(), valid , 以及 validate().
被这些函数引用 eve::physics::Destruction::makeWeldedBoxesFixture().
◆ schemaDefinition()
|
static |
Build the tooling schema that mirrors validate().
在文件 GeometryCollectionAsset.cpp 第 244 行定义.
引用了 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::GeometryCollectionAsset::toValue | ( | ) | const |
Encode the complete canonical version-2 value.
在文件 GeometryCollectionAsset.cpp 第 227 行定义.
引用了 bone, bones, edge, edges, eve::Result< T >::failure(), object, SchemaId, SchemaVersion, eve::Result< T >::success(), valid , 以及 validate().
◆ validate()
| eve::Result< void > eve::physics::GeometryCollectionAsset::validate | ( | ) | const |
Validate bone/edge topology and numeric ranges.
在文件 GeometryCollectionAsset.cpp 第 181 行定义.
引用了 bone, bones, edge, edges, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 value.
被这些函数引用 eve::physics::destruction_cook::cookGeometryCollection(), eve::physics::GeometryCollectionInstance::create(), fromValue(), makeClusterPillarFixture(), makeWeldedBoxesFixture() , 以及 toValue().
类成员变量说明
◆ bones
| std::vector<GeometryCollectionBone> eve::physics::GeometryCollectionAsset::bones |
◆ edges
| std::vector<GeometryCollectionEdge> eve::physics::GeometryCollectionAsset::edges |
◆ SchemaId
|
staticconstexpr |
在文件 GeometryCollectionAsset.h 第 49 行定义.
被这些函数引用 ensureSchemaRegistered(), fromValue(), schemaDefinition() , 以及 toValue().
◆ SchemaVersion
|
staticconstexpr |
在文件 GeometryCollectionAsset.h 第 50 行定义.
被这些函数引用 schemaDefinition() , 以及 toValue().
◆ SchemaVersionV1
|
staticconstexpr |
在文件 GeometryCollectionAsset.h 第 51 行定义.
被这些函数引用 fromValue().
该结构体的文档由以下文件生成:
- src/modules/physics/destruction/GeometryCollectionAsset.h
- src/modules/physics/destruction/GeometryCollectionAsset.cpp