/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A.  All Rights Reserved.                         *
*                                                                          *
***************************************************************************/

#pragma once

#include "glmSDKAPI.h"
#include <glmSpecificPosture.h>
#include <glmGenericPosture.h>
#include <glmBonePhysicConfiguration.h>
#include <glmHierarchicalSkeletonDescription.h>

namespace glm
{
	class GLM_SDK_API AnimationData
	{
	public:

		GLM_CLASS_STAT_ID( glm::MemoryStatIds::Simulation);

		typedef glm::SmartPointer<AnimationData> SP;

		//************************************************************
		//! @name Data
		//************************************************************
		//@{
		bool _useHalfExtents;
		Vector3 _halfExtents;

		Vector3 _postSimuTransformPos;
		Quaternion _postSimuTransformOri;
		//@}

		//************************************************************
		//! @name Runtime Data
		//************************************************************
		//@{
		SpecificPosture _specificPosture;
		SpecificPosture _specificPostureUVPin;
		glm::PODArray<float> _blindData;
		Vector3 _movingDirection;
		Vector3 _zupPelvisWorldPosition;
		Quaternion _zupPelvisWorldOrientation;

		HierarchicalSkeletonDescription::OverrideScales _specificSkeletonOverrideScales;

		PODArray<int>	_blindDataOverrideIndices;
		PODArray<float>	_blindDataOverrideValues;

		PODArray<unsigned int> _bonePhysicsConfigurationOverrideIndices;
		Array<BonePhysicConfiguration> _bonePhysicsConfigurationOverrides;
		//@}

		//************************************************************
		//! @name Temp converters
		//************************************************************
		//@{
		Vector3 getZupPelvisWorldPosition() const;
		Quaternion getZupPelvisWorldOrientation() const;
		Vector3 getMovingDirection() const;
		//@}

		AnimationData();
		AnimationData(const AnimationData& source);
		AnimationData& operator=(const AnimationData& source);
		~AnimationData();
	};
}
