载入中...
搜索中...
未找到
eve::physics::GeometryCollectionAsset结构体 参考

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()

eve::Result< void > eve::physics::GeometryCollectionAsset::ensureSchemaRegistered ( )
static

◆ fromValue()

eve::Result< GeometryCollectionAsset > eve::physics::GeometryCollectionAsset::fromValue ( const eve::Value &  value)
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.

被这些函数引用 eve::physics::Destruction::assetFromJson().

◆ makeClusterPillarFixture()

eve::Result< GeometryCollectionAsset > eve::physics::GeometryCollectionAsset::makeClusterPillarFixture ( float  interClusterStrain = 0.8f)
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()

eve::Result< GeometryCollectionAsset > eve::physics::GeometryCollectionAsset::makeWeldedBoxesFixture ( float  strainThreshold = 1.f)
static

◆ schemaDefinition()

◆ 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()

类成员变量说明

◆ bones

◆ edges

std::vector<GeometryCollectionEdge> eve::physics::GeometryCollectionAsset::edges

◆ SchemaId

constexpr std::string_view eve::physics::GeometryCollectionAsset::SchemaId = "physics:geometry-collection"
staticconstexpr

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

被这些函数引用 ensureSchemaRegistered(), fromValue(), schemaDefinition() , 以及 toValue().

◆ SchemaVersion

constexpr std::uint32_t eve::physics::GeometryCollectionAsset::SchemaVersion = 2
staticconstexpr

在文件 GeometryCollectionAsset.h 第 50 行定义.

被这些函数引用 schemaDefinition() , 以及 toValue().

◆ SchemaVersionV1

constexpr std::uint32_t eve::physics::GeometryCollectionAsset::SchemaVersionV1 = 1
staticconstexpr

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

被这些函数引用 fromValue().


该结构体的文档由以下文件生成: