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

Function GetPropertyAsQuat

engine/gameobject/src/gameobject/gameobject.cpp:3733–3753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3731 }
3732
3733 PropertyResult GetPropertyAsQuat(HInstance instance, dmhash_t component_id, dmhash_t property_id, dmVMath::Quat* out_value)
3734 {
3735 PropertyOptions options;
3736 PropertyDesc out_prop;
3737 PropertyResult result = GetProperty(instance, component_id, property_id, options, out_prop);
3738 if (result == PROPERTY_RESULT_OK)
3739 {
3740 if (PROPERTY_TYPE_QUAT == out_prop.m_Variant.m_Type)
3741 {
3742 out_value->setX(out_prop.m_Variant.m_V4[0]);
3743 out_value->setY(out_prop.m_Variant.m_V4[1]);
3744 out_value->setZ(out_prop.m_Variant.m_V4[2]);
3745 out_value->setW(out_prop.m_Variant.m_V4[3]);
3746 }
3747 else
3748 {
3749 result = PROPERTY_RESULT_TYPE_MISMATCH;
3750 }
3751 }
3752 return result;
3753 }
3754
3755 PropertyResult GetPropertyAsBool(HInstance instance, dmhash_t component_id, dmhash_t property_id, bool* out_value)
3756 {

Callers 1

TEST_FFunction · 0.85

Calls 5

setZMethod · 0.80
setWMethod · 0.80
GetPropertyFunction · 0.70
setXMethod · 0.45
setYMethod · 0.45

Tested by 1

TEST_FFunction · 0.68