///////////////////////////////////////////////////////////////////////////////
/// @file deAnimationController.hpp
///
/// @brief header for animation controller interfaces
///
/// @author Paradoxnj
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date January 2004
/// @author Paradoxnj
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////
#ifndef DE_ANIMATION_CONTROLLER_H
#define DE_ANIMATION_CONTROLLER_H

#include "deGlobalTypes.h"

// Forward Declarations
class IdeAnimationController;

typedef struct DAMFileHeader			DAMFileHeader;

typedef struct deRotationKey			deRotationKey;
typedef struct deVertexKey				deVertexKey;
typedef struct deActorAnimation			
/// Destiny Animation Module File Header
typedef struct DAMFileHeader
{
	char							Identifier[4];		//Should be DAM1
	int								version;

	short							controllerType;

	short							numBoneAnimations;
} DAMFileHeader;

/// A rotation key frame for skeletal animation
typedef struct deRotationKey
{
	/// The time that the rotation occurs in the animation
	float						time;

	/// The quaternion that represents the rotation of the bone
	deQuaternion				quat;
} deRotationKey;

/// A vertex key frame for skeletal animation used for scaling and positioning
typedef struct deVertexKey
{
	/// The time that the scale/positioning occurs in the animation
	float						time;

	/// The position/scaling value used to scale/position the bone
	deVertex					value;
} deVertexKey;

/// The animation information for an actor
/// NOTE:  This struct represents one entire animation sequence for one bone
typedef struct deAnimation
{
	/// The index of the bone that this animation is attached to
	long							BoneID;

	/// The amount of rotation keys
	UINT32							NumRotationKeys;

	/// The amount of position keys
	UINT32							NumPositionKeys;

	/// The amount of scale keys
	UINT32							NumScaleKeys;

	/// The rotation key frame array
	deTArray<deRotationKey>			RotationKeys;

	/// The positioning key frame array
	deTArray<deVertexKey>			PositionKeys;

	/// The scaling key frame array
	deTArray<deVertexKey>			ScaleKeys;
} deAnimation;

/// A set of bone animations
typedef struct deAnimationSet
{
	/// The name of the animation
	char						Name[MAX_ANIM_NAME];

	/// The length of the animation
	u32							Length;

	/// The bone animation array
	deTArray<deAnimation>		BoneAnimations;
} deAnimationSet;
