import struct IKTargetRef
{
	import var id : Int32;
	import var part : CName;
}

import abstract class IOrientationProvider extends IScriptable
{
	public import static function CreateStaticOrientationProvider( orientation : Quaternion ) : IOrientationProvider;
	public import static function CreateEntityOrientationProvider( slotComponent : weak< SlotComponent >, slotName : CName, entity : weak< Entity >, optional orientationEntitySpace : Quaternion ) : IOrientationProvider;
}

import struct IKTargetRequest
{
	import var weightPosition : Float;
	import var weightOrientation : Float;
	import var transitionIn : Float;
	import var transitionOut : Float;
	import var priority : Int32;
}

import class IKTargetAddEvent extends AnimTargetAddEvent
{
	import var request : IKTargetRequest;
	import var targetPositionProvider : IPositionProvider;
	import var orientationProvider : IOrientationProvider;
	import var outIKTargetRef : IKTargetRef;

	public import function SetEntityOrientationTarget( targetEntity : weak< Entity >, slotTargetName : CName, orientationOffsetEntitySpace : Quaternion );
	public import function SetStaticOrientationTarget( staticOrientationWs : Quaternion );
}

import class IKTargetRemoveEvent extends Event
{
	private import var ikTargetRef : IKTargetRef;

	public static function QueueRemoveIkTargetRemoveEvent( owner : GameObject, ikEvent : IKTargetAddEvent )
	{
		var removeLookatEvent : IKTargetRemoveEvent;
		removeLookatEvent = new IKTargetRemoveEvent;
		removeLookatEvent.ikTargetRef = ikEvent.outIKTargetRef;
		owner.QueueEvent( removeLookatEvent );
	}

}

