From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/mecanim/human/handle.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Runtime/mecanim/human/handle.h (limited to 'Runtime/mecanim/human/handle.h') diff --git a/Runtime/mecanim/human/handle.h b/Runtime/mecanim/human/handle.h new file mode 100644 index 0000000..af1df50 --- /dev/null +++ b/Runtime/mecanim/human/handle.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Runtime/mecanim/defs.h" +#include "Runtime/mecanim/memory.h" +#include "Runtime/mecanim/types.h" +#include "Runtime/Math/Simd/xform.h" + +#include "Runtime/Serialize/TransferFunctions/SerializeTransfer.h" + +namespace mecanim +{ + +namespace human +{ + struct Handle + { + DEFINE_GET_TYPESTRING(Handle) + + Handle(): + m_X(math::xformIdentity()), + m_ParentHumanIndex(numeric_limits::max_value), + m_ID(numeric_limits::max_value) + { + } + + math::xform m_X; // Local tranform + uint32_t m_ParentHumanIndex; // Related parent's human bone index + uint32_t m_ID; + + template + inline void Transfer (TransferFunction& transfer) + { + TRANSFER(m_X); + TRANSFER(m_ParentHumanIndex); + TRANSFER(m_ID); + } + }; +} + +} -- cgit v1.1-26-g67d0