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

Function GetPropertyAsVector3

engine/gameobject/src/gameobject/gameobject.cpp:3690–3709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3688 }
3689
3690 PropertyResult GetPropertyAsVector3(HInstance instance, dmhash_t component_id, dmhash_t property_id, dmVMath::Vector3* out_value)
3691 {
3692 PropertyOptions options;
3693 PropertyDesc out_prop;
3694 PropertyResult result = GetProperty(instance, component_id, property_id, options, out_prop);
3695 if (result == PROPERTY_RESULT_OK)
3696 {
3697 if (PROPERTY_TYPE_VECTOR3 == out_prop.m_Variant.m_Type)
3698 {
3699 out_value->setX(out_prop.m_Variant.m_V4[0]);
3700 out_value->setY(out_prop.m_Variant.m_V4[1]);
3701 out_value->setZ(out_prop.m_Variant.m_V4[2]);
3702 }
3703 else
3704 {
3705 result = PROPERTY_RESULT_TYPE_MISMATCH;
3706 }
3707 }
3708 return result;
3709 }
3710
3711 PropertyResult GetPropertyAsVector4(HInstance instance, dmhash_t component_id, dmhash_t property_id, dmVMath::Vector4* out_value)
3712 {

Callers 1

TEST_FFunction · 0.85

Calls 4

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

Tested by 1

TEST_FFunction · 0.68