///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Alien_MovesJump.h
// Author : Andy Tate
// Date   : 4-Sep-2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE

#ifndef __AVP_ALIEN_MOVESJUMP_H__
#define __AVP_ALIEN_MOVESJUMP_H__

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////

#include "Entity/PhysicalObject/Moves/Asura_MoveData_Animation.h"
#include "Entity/PhysicalObject/Moves/Asura_MoveData_OrientationInterpolation.h"
#include "Entity/PhysicalObject/Moves/Asura_MoveData_PositionInterpolation.h"

#include "Entity/PhysicalObject/Actor/Vertebrates/Alien/AVP_Messages_Alien.h"
#include "Moves/AVP_Moves.h"

////////////////////////////////////////////////////////////////////////////////
// Forward declarations...
////////////////////////////////////////////////////////////////////////////////

class AVP_ClientActor_Alien;

////////////////////////////////////////////////////////////////////////////////
// Class declaration...
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Move_Alien_JumpSurface
// Author       : Andy Tate
// Date         : 4-Sep-2007
//
// Description  : Class to handle common code when using moves related to the
//				  Alien's ability to jump from surface-to-surface.
////////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_JumpSurface : public AVP_Move
{
public:
	AVP_Move_Alien_JumpSurface(Asura_Movement_System& xParentSystem, const Asura_Hash_ID uMoveHash);

protected:
	// Overridden functions...
	virtual bool		Start(const Asura_Msg_Move* pxStartMsg);
	virtual	bool		ShouldStart() const { return false; }

	// Abstract functions...
	virtual void	CalculateTargetOrientation(const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation) const	= 0;

    Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
    Asura_MoveData_PositionInterpolation	m_xPositionInterpolationData;

private:
	typedef AVP_Move PARENT;

    AVP_Move_Alien_JumpSurface(void);
	AVP_Move_Alien_JumpSurface(const AVP_Move_Alien_JumpSurface& xOther);
	AVP_Move_Alien_JumpSurface&	operator=(const AVP_Move_Alien_JumpSurface& xOther);
};

class AVP_Move_Alien_JumpDropStart : public AVP_Move
{
public:
	AVP_Move_Alien_JumpDropStart(Asura_Movement_System& xParentSystem);

	virtual const char*		GetName(void) const	{ return("AVP_Move_Alien_JumpDropStart"); }
	static Asura_Hash_ID	GetStaticHash(void)	{ return(0xba231e63); }	// Asura_GetHashID("AVP_Move_Alien_JumpDropStart")); }

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual void Finish();
	virtual void Abort();

	virtual void UpdateStates( const float fTimeStep );
	virtual bool HasFinished() const;
	virtual bool CalculateVelocity( const float fTimeStep, Asura_AVector3_OutParam xVelocity ) const;

	virtual	bool ShouldStart() const { return false; }

	void CalculateTargetOrientation( Asura_AMatrix3x3& xTargetOrientation ) const;

private:
	typedef AVP_Move PARENT;

	Asura_AVector3 m_xAwayFromSurfaceStart;
	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
	float m_fTimeSinceStart;
	bool m_bInAir;
	bool m_bFinished;

	AVP_Move_Alien_JumpDropStart(void);
	AVP_Move_Alien_JumpDropStart(const AVP_Move_Alien_JumpDropStart& xOther);
	AVP_Move_Alien_JumpDropStart&	operator=(const AVP_Move_Alien_JumpDropStart& xOther);
};

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Move_Alien_JumpSurface180
// Author       : Andy Tate
// Date         : 4-Sep-2007
//
// Description  : Class to handle the Alien's jumping from surface-to-surface
//				  (when the surfaces are 180 degrees apart, e.g. floor-to-ceiling).
////////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_JumpSurface180 : public AVP_Move_Alien_JumpSurface
{
public:
	AVP_Move_Alien_JumpSurface180(Asura_Movement_System& xParentSystem);

	virtual const char*		GetName(void) const	{ return("AVP_Move_Alien_JumpSurface180"); }
	static Asura_Hash_ID	GetStaticHash(void)	{ return(0x9E5ADD8C); }	// Asura_GetHashID("AVP_Move_Alien_JumpSurface180")); }

protected:
	virtual void	CalculateTargetOrientation(const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation) const;

private:
	typedef AVP_Move_Alien_JumpSurface PARENT;

	AVP_Move_Alien_JumpSurface180(void);
	AVP_Move_Alien_JumpSurface180(const AVP_Move_Alien_JumpSurface180& xOther);
	AVP_Move_Alien_JumpSurface180&	operator=(const AVP_Move_Alien_JumpSurface180& xOther);
};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_JumpSurfaceConcave90Start
// Start of the jump, with wind-up movement along the initial surface.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_JumpSurfaceConcave90Begin : public AVP_Move
{
public:
    AVP_Move_Alien_JumpSurfaceConcave90Begin( Asura_Movement_System& xParentSystem );

    virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_JumpSurfaceConcave90Start" ); }
    static Asura_Hash_ID GetStaticHash(void) { return 0x262ab639; } // Asura_GetHashID( "AVP_Move_Alien_JumpSurfaceConcave90Start" )

protected:
    virtual bool Start( const Asura_Msg_Move* pxStartMsg );
    virtual	void Abort();

protected:

private:
    typedef AVP_Move PARENT;

    AVP_Move_Alien_JumpSurfaceConcave90Begin(void);
    AVP_Move_Alien_JumpSurfaceConcave90Begin(const AVP_Move_Alien_JumpSurfaceConcave90Begin& xOther);
    AVP_Move_Alien_JumpSurfaceConcave90Begin& operator=(const AVP_Move_Alien_JumpSurfaceConcave90Begin& xOther);
};


////////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_JumpSurfaceConcave90
// In air jumping from surface to surface.
//
////////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_JumpSurfaceConcave90Middle : public AVP_Move_Alien_JumpSurface
{
public:
	AVP_Move_Alien_JumpSurfaceConcave90Middle(Asura_Movement_System& xParentSystem);

    void SetJumpStartMessage( const AVP_Message_Alien_Move_JumpSurfaceStart& xJumpStartMessage );

    virtual const char*	 GetName(void) const { return("AVP_Move_Alien_JumpSurfaceConcave90Middle"); }
    static Asura_Hash_ID GetStaticHash(void) { return(0x9455229e); } // Asura_GetHashID( "AVP_Move_Alien_JumpSurfaceConcave90Middle" )

protected:
    virtual bool Start( const Asura_Msg_Move* pxStartMsg );
    virtual bool ShouldStart() const { return true; }

	virtual void CalculateTargetOrientation(const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation) const;

private:
    AVP_Message_Alien_Move_JumpSurfaceStart m_xJumpStartMessage;

	typedef AVP_Move_Alien_JumpSurface PARENT;

    AVP_Move_Alien_JumpSurfaceConcave90Middle(void);
	AVP_Move_Alien_JumpSurfaceConcave90Middle(const AVP_Move_Alien_JumpSurfaceConcave90Middle& xOther);
	AVP_Move_Alien_JumpSurfaceConcave90Middle& operator=(const AVP_Move_Alien_JumpSurfaceConcave90Middle& xOther);
};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_JumpSurfaceConcave90End
// End of the jump, with wind-down movement along the target surface.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_JumpSurfaceConcave90End : public AVP_Move
{
public:
    AVP_Move_Alien_JumpSurfaceConcave90End( Asura_Movement_System& xParentSystem );

    void SetJumpStartMessage( const AVP_Message_Alien_Move_JumpSurfaceStart& xJumpStartMessage );

    virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_JumpSurfaceConcave90End" ); }
    static Asura_Hash_ID GetStaticHash(void) { return 0x51d20472; } // Asura_GetHashID( "AVP_Move_Alien_JumpSurfaceConcave90End" )

protected:
    virtual bool Start( const Asura_Msg_Move* pxStartMsg );
    virtual void Finish();
    virtual	void Abort();

private:
    typedef AVP_Move PARENT;

    AVP_Move_Alien_JumpSurfaceConcave90End(void);
    AVP_Move_Alien_JumpSurfaceConcave90End(const AVP_Move_Alien_JumpSurfaceConcave90End& xOther);
    AVP_Move_Alien_JumpSurfaceConcave90End& operator=(const AVP_Move_Alien_JumpSurfaceConcave90End& xOther);
};

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Move_Alien_JumpSurfaceConcave90
// Author       : Andy Tate
// Date         : 13-Sep-2007
//
// Description  : Class to handle the Alien's jumping from surface-to-surface
//				  (when the surfaces are concave and 90 degrees apart).
//                For 'all-in-one' jumps with no into and out from moves.
////////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_JumpSurfaceConcave90 : public AVP_Move_Alien_JumpSurface
{
public:
    AVP_Move_Alien_JumpSurfaceConcave90(Asura_Movement_System& xParentSystem);

    virtual const char*	 GetName(void) const { return("AVP_Move_Alien_JumpSurfaceConcave90"); }
    static Asura_Hash_ID GetStaticHash(void) { return(0x66E803C9); } // Asura_GetHashID("AVP_Move_Alien_JumpSurfaceConcave90")); }

protected:
    virtual void CalculateTargetOrientation(const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation) const;

private:
    typedef AVP_Move_Alien_JumpSurface PARENT;

	AVP_Move_Alien_JumpSurfaceConcave90(void);
	AVP_Move_Alien_JumpSurfaceConcave90(const AVP_Move_Alien_JumpSurfaceConcave90& xOther);
	AVP_Move_Alien_JumpSurfaceConcave90& operator=(const AVP_Move_Alien_JumpSurfaceConcave90& xOther);
};

//////////////////////////////////////////////////////////////////////////////
//
// Hop left/right.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_HopLeft : public AVP_Move
{
public:
	AVP_Move_Alien_HopLeft( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_HopLeft"; }
	static Asura_Hash_ID GetStaticHash() { return 0xeeb8ea4e; } // Asura_GetHashID( "AVP_Move_Alien_HopLeft" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );

private:
	typedef AVP_Move PARENT;
};

class AVP_Move_Alien_HopRight : public AVP_Move
{
public:
	AVP_Move_Alien_HopRight( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_HopRight"; }
	static Asura_Hash_ID GetStaticHash() { return 0xe8bac0b5; } // Asura_GetHashID( "AVP_Move_Alien_HopRight" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );

private:
	typedef AVP_Move PARENT;
};


class AVP_Move_Alien_WallHopLeft : public AVP_Move
{
public:
	AVP_Move_Alien_WallHopLeft( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_WallHopLeft"; }
	static Asura_Hash_ID GetStaticHash() { return 0x72d83244; } // Asura_GetHashID( "AVP_Move_Alien_WallHopLeft" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );

private:
	typedef AVP_Move PARENT;
};

class AVP_Move_Alien_WallHopRight : public AVP_Move
{
public:
	AVP_Move_Alien_WallHopRight( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_WallHopRight"; }
	static Asura_Hash_ID GetStaticHash() { return 0xe884777f; } // Asura_GetHashID( "AVP_Move_Alien_WallHopRight" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );

private:
	typedef AVP_Move PARENT;
};

//////////////////////////////////////////////////////////////////////////////
//
// Jump floor -> wall left/right.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_JumpOnToWallLeft : public AVP_Move_Alien_JumpSurface
{
public:
	AVP_Move_Alien_JumpOnToWallLeft( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_JumpOnToWallLeft"; }
	static Asura_Hash_ID GetStaticHash() { return 0xf3e42ddb; } // Asura_GetHashID( "AVP_Move_Alien_JumpOnToWallLeft" )

protected:
	virtual void CalculateTargetOrientation( const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation ) const;

private:
	typedef AVP_Move_Alien_JumpSurface PARENT;

	AVP_Move_Alien_JumpOnToWallLeft();
	AVP_Move_Alien_JumpOnToWallLeft(const AVP_Move_Alien_JumpOnToWallLeft& xOther);
	AVP_Move_Alien_JumpOnToWallLeft& operator=(const AVP_Move_Alien_JumpOnToWallLeft& xOther);
};

class AVP_Move_Alien_JumpOnToWallRight : public AVP_Move_Alien_JumpSurface
{
public:
	AVP_Move_Alien_JumpOnToWallRight( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_JumpOnToWallRight"; }
	static Asura_Hash_ID GetStaticHash() { return 0x88f7eec8; } // Asura_GetHashID( "AVP_Move_Alien_JumpOnToWallRight" )

protected:
	virtual void CalculateTargetOrientation( const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation ) const;

private:
	typedef AVP_Move_Alien_JumpSurface PARENT;

	AVP_Move_Alien_JumpOnToWallRight();
	AVP_Move_Alien_JumpOnToWallRight(const AVP_Move_Alien_JumpOnToWallRight& xOther);
	AVP_Move_Alien_JumpOnToWallRight& operator=(const AVP_Move_Alien_JumpOnToWallRight& xOther);
};

//////////////////////////////////////////////////////////////////////////////
//
// 180 turn-and-go.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_180TurnToCrawl : public AVP_Move
{
public:
	AVP_Move_Alien_180TurnToCrawl( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_180TurnToCrawl"; }
	static Asura_Hash_ID GetStaticHash() { return 0x85c16ca8; } // Asura_GetHashID( "AVP_Move_Alien_180TurnToCrawl" )

private:
	typedef AVP_Move PARENT;
};

//////////////////////////////////////////////////////////////////////////////
//
// 90 turn-and-go.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_90TurnToCrawlLeft : public AVP_Move
{
public:
	AVP_Move_Alien_90TurnToCrawlLeft( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_90TurnToCrawlLeft"; }
	static Asura_Hash_ID GetStaticHash() { return 0x132a68fd; } // Asura_GetHashID( "AVP_Move_Alien_90TurnToCrawlLeft" )

private:
	typedef AVP_Move PARENT;
};

class AVP_Move_Alien_90TurnToCrawlRight : public AVP_Move
{
public:
	AVP_Move_Alien_90TurnToCrawlRight( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_90TurnToCrawlRight"; }
	static Asura_Hash_ID GetStaticHash() { return 0x527917e6; } // Asura_GetHashID( "AVP_Move_Alien_90TurnToCrawlRight" )

private:
	typedef AVP_Move PARENT;
};

//////////////////////////////////////////////////////////////////////////////
//
// Falling stuff.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_FallingBegin : public AVP_Move
{
public:
	AVP_Move_Alien_FallingBegin( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_FallingBegin"; }
	static Asura_Hash_ID GetStaticHash() { return 0x887486c4; } // Asura_GetHashID( "AVP_Move_Alien_FallingBegin" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );

	virtual void	CalculateTargetOrientation(const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation) const;

private:
	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;

	typedef AVP_Move PARENT;
};

class AVP_Move_Alien_Falling : public AVP_Move
{
public:
	AVP_Move_Alien_Falling( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_Falling"; }
	static Asura_Hash_ID GetStaticHash() { return 0x6cd04d05; } // Asura_GetHashID( "AVP_Move_Alien_Falling" )

protected:
	
	virtual bool HasFinished() const;
	virtual void UpdateStates(const float fTimeStep);

private:
	float m_fMoveTimer;
	bool m_bInAir;
	bool m_bFinished;

	typedef AVP_Move PARENT;
};

class AVP_Move_Alien_FallingEnd : public AVP_Move
{
public:
	AVP_Move_Alien_FallingEnd( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_FallingEnd"; }
	static Asura_Hash_ID GetStaticHash() { return 0xc43461b6; } // Asura_GetHashID( "AVP_Move_Alien_FallingEnd" )

protected:

private:
	typedef AVP_Move PARENT;
};

class AVP_Move_Alien_DuctSurfaceSwitch : public AVP_Move_Alien_JumpSurface
{
public:
	AVP_Move_Alien_DuctSurfaceSwitch(Asura_Movement_System& xParentSystem);
	virtual const char* GetName() const { return "AVP_Move_Alien_DuctSurfaceSwitch"; }

	virtual void CalculateTargetOrientation(const Asura_Vector_3& xTargetNormal, Asura_Matrix_3x3& xTargetOrientation) const;

	static Asura_Hash_ID GetStaticHash() { return 0x8538BD9D; } // Asura_GetHashID( "AVP_Move_Alien_DuctSurfaceSwitch" )

protected:
	virtual bool Start(const Asura_Msg_Move* pxStartMsg);

private:
	typedef AVP_Move_Alien_JumpSurface PARENT;
};


////////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_JumpSurfaceFlat
//
////////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_JumpSurfaceFlat : public AVP_Move
{
public:
	AVP_Move_Alien_AI_JumpSurfaceFlat(Asura_Movement_System& xParentSystem, Asura_Hash_ID uHash);

	void SetJumpStartMessage( const AVP_Message_Alien_AI_Move_JumpSurfaceStart& xJumpStartMessage );

	AVP_Move_Alien_AI_JumpSurfaceFlat(Asura_Movement_System& xParentSystem);
	virtual const char*	 GetName(void) const { return("AVP_Move_Alien_AI_JumpSurfaceFlat"); }
	static Asura_Hash_ID GetStaticHash(void) { return(0x26474563); } // Asura_GetHashID( "AVP_Move_Alien_AI_JumpSurfaceFlat" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual	bool ShouldStart() const;
	virtual void Finish();
	virtual	void Abort();

private:
	AVP_Message_Alien_AI_Move_JumpSurfaceStart m_xJumpStartMessage;
	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
	Asura_MoveData_PositionInterpolation	m_xPositionInterpolationData;

	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_JumpSurfaceFlat(void);
	AVP_Move_Alien_AI_JumpSurfaceFlat(const AVP_Move_Alien_AI_JumpSurfaceFlat& xOther);
	AVP_Move_Alien_AI_JumpSurfaceFlat& operator=(const AVP_Move_Alien_AI_JumpSurfaceFlat& xOther);
};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_JumpSurfaceConcave90Begin
// Start of the jump, with wind-up movement along the initial surface.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_JumpSurfaceConcave90Begin : public AVP_Move
{
public:
	AVP_Move_Alien_AI_JumpSurfaceConcave90Begin( Asura_Movement_System& xParentSystem );

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_JumpSurfaceConcave90Begin" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x1ae1666d; } // Asura_GetHashID( "AVP_Move_Alien_AI_JumpSurfaceConcave90Begin" )

	void SetJumpStartMessage( const AVP_Message_Alien_AI_Move_JumpSurfaceStart& xJumpStartMessage );

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual	void Abort();
	virtual	bool ShouldStart() const;

protected:

private:


	AVP_Message_Alien_AI_Move_JumpSurfaceStart m_xJumpStartMessage;
	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_JumpSurfaceConcave90Begin(void);
	AVP_Move_Alien_AI_JumpSurfaceConcave90Begin(const AVP_Move_Alien_AI_JumpSurfaceConcave90Begin& xOther);
	AVP_Move_Alien_AI_JumpSurfaceConcave90Begin& operator=(const AVP_Move_Alien_AI_JumpSurfaceConcave90Begin& xOther);
};


////////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_JumpSurfaceConcave90Middle
// In air jumping from surface to surface.
//
////////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_JumpSurfaceConcave90Middle : public AVP_Move
{
public:
	AVP_Move_Alien_AI_JumpSurfaceConcave90Middle(Asura_Movement_System& xParentSystem);

	void SetJumpStartMessage( const AVP_Message_Alien_AI_Move_JumpSurfaceStart& xJumpStartMessage );

	virtual const char*	 GetName(void) const { return("AVP_Move_Alien_AI_JumpSurfaceConcave90Middle"); }
	static Asura_Hash_ID GetStaticHash(void) { return(0x5447a451); } // Asura_GetHashID( "AVP_Move_Alien_AI_JumpSurfaceConcave90Middle" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual bool ShouldStart() const { return true; }

private:
	AVP_Message_Alien_AI_Move_JumpSurfaceStart m_xJumpStartMessage;
	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
	Asura_MoveData_PositionInterpolation	m_xPositionInterpolationData;

	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_JumpSurfaceConcave90Middle(void);
	AVP_Move_Alien_AI_JumpSurfaceConcave90Middle(const AVP_Move_Alien_AI_JumpSurfaceConcave90Middle& xOther);
	AVP_Move_Alien_AI_JumpSurfaceConcave90Middle& operator=(const AVP_Move_Alien_AI_JumpSurfaceConcave90Middle& xOther);
};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_JumpSurfaceConcave90End
// End of the jump, with wind-down movement along the target surface.
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_JumpSurfaceConcave90End : public AVP_Move
{
public:
	AVP_Move_Alien_AI_JumpSurfaceConcave90End( Asura_Movement_System& xParentSystem );

	void SetJumpStartMessage( const AVP_Message_Alien_AI_Move_JumpSurfaceStart& xJumpStartMessage );

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_JumpSurfaceConcave90End" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x5c77179f; } // Asura_GetHashID( "AVP_Move_Alien_AI_JumpSurfaceConcave90End" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual void Finish();
	virtual	void Abort();

private:
	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_JumpSurfaceConcave90End(void);
	AVP_Move_Alien_AI_JumpSurfaceConcave90End(const AVP_Move_Alien_AI_JumpSurfaceConcave90End& xOther);
	AVP_Move_Alien_AI_JumpSurfaceConcave90End& operator=(const AVP_Move_Alien_AI_JumpSurfaceConcave90End& xOther);
};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_TurnMoveAndJumpSurfaceConcave90BeginBase
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_TurnAndJumpSurfaceBase : public AVP_Move
{
public:
	AVP_Move_Alien_AI_TurnAndJumpSurfaceBase( Asura_Movement_System& xParentSystem, Asura_Hash_ID uHash );

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual	void Abort();

protected:

private:

	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
	Asura_MoveData_PositionInterpolation	m_xPositionInterpolationData;

	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_TurnAndJumpSurfaceBase(void);
	AVP_Move_Alien_AI_TurnAndJumpSurfaceBase(const AVP_Move_Alien_AI_TurnAndJumpSurfaceBase& xOther);
	AVP_Move_Alien_AI_TurnAndJumpSurfaceBase& operator=(const AVP_Move_Alien_AI_TurnAndJumpSurfaceBase& xOther);
};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_MoveForwardAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_MoveForwardAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_MoveForwardAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_MoveForwardAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x930d140e; } // Asura_GetHashID( "AVP_Move_Alien_AI_MoveForwardAndJumpSurface" )

private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn90LeftAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn90LeftAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn90LeftAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn90LeftAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x2b4f2558; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn90LeftAndJumpSurface" )

private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn90RightAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn90RightAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn90RightAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn90RightAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x1aad49bb; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn90RightAndJumpSurface" )
private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn90OnSpotRightAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn90OnSpotRightAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn90OnSpotRightAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn90OnSpotRightAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x3a41f77a; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn90OnSpotRightAndJumpSurface" )
private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn90OnSpotLeftAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn90OnSpotLeftAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn90OnSpotLeftAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn90OnSpotLeftAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x559e43b9; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn90OnSpotLeftAndJumpSurface" )

private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn180LeftAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn180LeftAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn180LeftAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn180LeftAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0xd6454b86; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn180LeftAndJumpSurface" )
private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn180RightAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn180RightAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn180RightAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn180RightAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0xce7be94d; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn180RightAndJumpSurface" )
private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn180OnSpotLeftAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn180OnSpotLeftAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn180OnSpotLeftAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn180OnSpotLeftAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x1e3e8f67; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn180OnSpotLeftAndJumpSurface" )
private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn180OnSpotRightAndJumpSurface
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn180OnSpotRightAndJumpSurface : public AVP_Move_Alien_AI_TurnAndJumpSurfaceBase
{
public:
	AVP_Move_Alien_AI_Turn180OnSpotRightAndJumpSurface( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn180OnSpotRightAndJumpSurface" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x85ab218c; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn180OnSpotRightAndJumpSurface" )
private:

	typedef AVP_Move_Alien_AI_TurnAndJumpSurfaceBase PARENT;

};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_JumpSurfaceConcaveLeft
// Jump when start and end have same forward vector
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_JumpSurfaceConcaveLeft : public AVP_Move
{
public:
	AVP_Move_Alien_AI_JumpSurfaceConcaveLeft( Asura_Movement_System& xParentSystem );

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_JumpSurfaceConcaveLeft" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x03138b6c; } // Asura_GetHashID( "AVP_Move_Alien_AI_JumpSurfaceConcaveLeft" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual	void Abort();

protected:

private:

	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
	Asura_MoveData_PositionInterpolation	m_xPositionInterpolationData;

	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_JumpSurfaceConcaveLeft(void);
	AVP_Move_Alien_AI_JumpSurfaceConcaveLeft(const AVP_Move_Alien_AI_JumpSurfaceConcaveLeft& xOther);
	AVP_Move_Alien_AI_JumpSurfaceConcaveLeft& operator=(const AVP_Move_Alien_AI_JumpSurfaceConcaveLeft& xOther);
};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_JumpSurfaceConcaveRight
// Jump when start and end have same forward vector
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_JumpSurfaceConcaveRight : public AVP_Move
{
public:
	AVP_Move_Alien_AI_JumpSurfaceConcaveRight( Asura_Movement_System& xParentSystem );

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_JumpSurfaceConcaveRight" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x5fb44357; } // Asura_GetHashID( "AVP_Move_Alien_AI_JumpSurfaceConcaveRight" )

protected:
	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual	void Abort();

protected:

private:
	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
	Asura_MoveData_PositionInterpolation	m_xPositionInterpolationData;

	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_JumpSurfaceConcaveRight(void);
	AVP_Move_Alien_AI_JumpSurfaceConcaveRight(const AVP_Move_Alien_AI_JumpSurfaceConcaveRight& xOther);
	AVP_Move_Alien_AI_JumpSurfaceConcaveRight& operator=(const AVP_Move_Alien_AI_JumpSurfaceConcaveRight& xOther);
};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn180Left
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn180Left : public AVP_Move
{
public:
	AVP_Move_Alien_AI_Turn180Left( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn180Left" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0xb71b6d7e; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn180Left" )

	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual	void Abort();

private:

	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;

	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_Turn180Left(void);
	AVP_Move_Alien_AI_Turn180Left(const AVP_Move_Alien_AI_Turn180Left& xOther);
	AVP_Move_Alien_AI_Turn180Left& operator=(const AVP_Move_Alien_AI_Turn180Left& xOther);


};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_Turn180Right
// Turn Before Jump
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_Turn180Right : public AVP_Move
{
public:
	AVP_Move_Alien_AI_Turn180Right( Asura_Movement_System& xParentSystem);

	virtual const char*	 GetName(void) const { return( "AVP_Move_Alien_AI_Turn180Right" ); }
	static Asura_Hash_ID GetStaticHash(void) { return 0x2ca8a385; } // Asura_GetHashID( "AVP_Move_Alien_AI_Turn180Right" )

	virtual bool Start( const Asura_Msg_Move* pxStartMsg );
	virtual	void Abort();

private:

	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;

	typedef AVP_Move PARENT;

	AVP_Move_Alien_AI_Turn180Right(void);
	AVP_Move_Alien_AI_Turn180Right(const AVP_Move_Alien_AI_Turn180Right& xOther);
	AVP_Move_Alien_AI_Turn180Right& operator=(const AVP_Move_Alien_AI_Turn180Right& xOther);


};



//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_FallStart
// Falling start
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_FallStart : public AVP_Move
{
public:
	AVP_Move_Alien_AI_FallStart( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_AI_FallStart"; }
	static Asura_Hash_ID GetStaticHash() { return 0x887532b2; } //"AVP_Move_Alien_AI_FallStart"

	bool ShouldMiddleStart() const { return m_bStartMiddleMove; }
	bool ShouldEndStart() const { return m_bStartEndMove; }

	const Asura_Vector_3& GetEndPosition() const { return m_xEndPosition; }

protected:

	virtual bool Start(const Asura_Msg_Move* pxStartMsg);
	virtual	void Abort();
	
	virtual void UpdateStates(const float fTimeStep);
	virtual bool HasFinished() const;
	virtual bool CalculateVelocity(const float fTimeStep, Asura_AVector3_OutParam xVelocity) const;


private:
	Asura_MoveData_OrientationInterpolation	m_xOrientationInterpolationData;
	float m_fTimeSinceStart;
	bool m_bFinished;
	bool m_bStartMiddleMove;
	bool m_bStartEndMove;
	float m_fDuration;
	Asura_AVector3 m_xAwayFromSurfaceStart;
	Asura_Vector_3 m_xEndPosition;

	typedef AVP_Move PARENT;
};

//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_FallMiddle
// Falling Middle
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_FallMiddle : public AVP_Move
{
public:
	AVP_Move_Alien_AI_FallMiddle( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_AI_FallMiddle"; }
	static Asura_Hash_ID GetStaticHash() { return 0x7b5a3545; } //"AVP_Move_Alien_AI_FallMiddle"

	const Asura_Vector_3& GetEndPosition() const { return m_xEndPosition; }


protected:

	virtual bool ShouldStart() const;
	virtual bool Start(const Asura_Msg_Move* pxStartMsg);
	virtual	void Abort();

	virtual void UpdateStates(const float fTimeStep);
	virtual bool HasFinished() const;

private:
	float m_fTimeSinceStart;
	bool m_bFinished;
	Asura_Vector_3 m_xEndPosition;

	typedef AVP_Move PARENT;
};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_AI_FallEnd
// Falling End
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_AI_FallEnd : public AVP_Move
{
public:
	AVP_Move_Alien_AI_FallEnd( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_AI_FallEnd"; }
	static Asura_Hash_ID GetStaticHash() { return 0x0f534b2b; } //"AVP_Move_Alien_AI_FallEnd"

	virtual	void Abort();
	virtual bool ShouldStart() const;
	virtual bool Start(const Asura_Msg_Move* pxStartMsg);

protected:

private:

	Asura_MoveData_PositionInterpolation	m_xPositionInterpolationData;

	typedef AVP_Move PARENT;
};


//////////////////////////////////////////////////////////////////////////////
//
// AVP_Move_Alien_Hiss
// Hissing
//
//////////////////////////////////////////////////////////////////////////////

class AVP_Move_Alien_Hiss : public AVP_Move
{
public:
	AVP_Move_Alien_Hiss( Asura_Movement_System& xParentSystem );
	virtual const char*	 GetName() const { return "AVP_Move_Alien_Hiss"; }
	static Asura_Hash_ID GetStaticHash() { return 0x4c341d63; } //"AVP_Move_Alien_Hiss"

protected:

private:

	typedef AVP_Move PARENT;
};




//////////////////////////////////////////////////////////////////////////////
//
// 
//
//////////////////////////////////////////////////////////////////////////////

#endif   // ifndef __AVP_ALIEN_MOVESJUMP_H__
