MCPcopy Create free account
hub / github.com/defold/defold / CreateMorphOnlyRigInstance

Function CreateMorphOnlyRigInstance

engine/rig/src/test/test_rig.cpp:2067–2083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2065}
2066
2067static dmRig::HRigInstance CreateMorphOnlyRigInstance(dmRig::HRigContext ctx, dmRigDDF::MeshSet* mesh_set, dmRigDDF::AnimationSet* anim_set, uint64_t model_id)
2068{
2069 dmArray<dmRig::RigBone> bind_pose;
2070 dmHashTable64<uint32_t> bone_indices;
2071 bone_indices.SetCapacity(1, 1);
2072 dmRig::InstanceCreateParams ip = {};
2073 ip.m_BindPose = &bind_pose;
2074 ip.m_BoneIndices = &bone_indices;
2075 ip.m_Skeleton = 0;
2076 ip.m_MeshSet = mesh_set;
2077 ip.m_AnimationSet = anim_set;
2078 ip.m_ModelId = model_id;
2079 dmRig::HRigInstance inst = 0;
2080 if (dmRig::InstanceCreate(ctx, ip, &inst) != dmRig::RESULT_OK)
2081 return 0;
2082 return inst;
2083}
2084
2085TEST(RigMorphWeights, SetMorphWeightsWritesBuffer)
2086{

Callers 1

TESTFunction · 0.85

Calls 2

InstanceCreateFunction · 0.50
SetCapacityMethod · 0.45

Tested by

no test coverage detected