summaryrefslogtreecommitdiff
path: root/Runtime/mecanim/human/handle.h
blob: af1df50fd205f8f0a9cd37906be3655d3a3b33d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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<uint32_t>::max_value),
			m_ID(numeric_limits<uint32_t>::max_value)
		{			
		}

		math::xform	m_X;					// Local tranform		
		uint32_t	m_ParentHumanIndex;	// Related parent's human bone index
		uint32_t	m_ID;

		template<class TransferFunction>
		inline void Transfer (TransferFunction& transfer)
		{
			TRANSFER(m_X);
			TRANSFER(m_ParentHumanIndex);
			TRANSFER(m_ID);
		}
	};
}

}