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

Function GetPropertyAsVector4

engine/gameobject/src/gameobject/gameobject.cpp:3711–3731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3709 }
3710
3711 PropertyResult GetPropertyAsVector4(HInstance instance, dmhash_t component_id, dmhash_t property_id, dmVMath::Vector4* out_value)
3712 {
3713 PropertyOptions options;
3714 PropertyDesc out_prop;
3715 PropertyResult result = GetProperty(instance, component_id, property_id, options, out_prop);
3716 if (result == PROPERTY_RESULT_OK)
3717 {
3718 if (PROPERTY_TYPE_VECTOR4 == out_prop.m_Variant.m_Type)
3719 {
3720 out_value->setX(out_prop.m_Variant.m_V4[0]);
3721 out_value->setY(out_prop.m_Variant.m_V4[1]);
3722 out_value->setZ(out_prop.m_Variant.m_V4[2]);
3723 out_value->setW(out_prop.m_Variant.m_V4[3]);
3724 }
3725 else
3726 {
3727 result = PROPERTY_RESULT_TYPE_MISMATCH;
3728 }
3729 }
3730 return result;
3731 }
3732
3733 PropertyResult GetPropertyAsQuat(HInstance instance, dmhash_t component_id, dmhash_t property_id, dmVMath::Quat* out_value)
3734 {

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