//*******************************************************************
//
// File: Tools_BotanicalCreation_BasicInteractive.h
//
// Created: 15 Nov 2006
//
// Description: 
//
//*******************************************************************

#ifndef _TOOLS_BOTANICALCREATION_BASICINTERACTIVE_H_
#define _TOOLS_BOTANICALCREATION_BASICINTERACTIVE_H_

#if defined( ASURA_BOTANICAL_SUPPORT_INTERACTIVE)

// other libraries

// internal dependencies

// forward declarations

class Asura_Mesh;
class Asura_Dialog;

//*******************************************************************
// Constants
//*******************************************************************


//*******************************************************************
// Class Definitions
//*******************************************************************

class Tools_BotanicalCreation_BasicInteractive
{
public:
	enum Mode
	{
		MODE_NORMAL,
		MODE_LITE,
	};
	
public:
	static void Reset();				// Call this at startup, and when the number of loaded elements/lods changes
	static void CreateOverlay();
	static void CloseOverlay();
	static void Update();
	static void Render();
	
	static inline bool IsActive() { return(true == s_bOverlayOpen);}
	
	static void SetMode( const Mode eMode);
	
private:
	static void Dialog_Enable();
	static void Dialog_EnableAutoWeights();
	
private:
	static bool s_bOverlayOpen;
	static Asura_Vector_2 s_xOverlayPosition;

	static bool s_bDataChanged;

	static bool s_bEnableBasicInteractive;
	static float s_fMass;
	static float s_fDrag;
	static float s_fSpringStrength;
	static float s_fSpringLength;
	static float s_fBoneWeightGamma;
	static bool s_bUsePaintedColoursAsWeights;
	static Asura_Vector_3 s_xPositionBone0;
	static Asura_Vector_3 s_xPositionBone1;
	static Asura_Mesh* s_pxBoneMesh;
	
	static Mode s_eMode;
	
	static Asura_Dialog* s_pxDialog_Enable;
	
	static Asura_Dialog* s_pxDialog_Mass;
	static Asura_Dialog* s_pxDialog_Drag;
	static Asura_Dialog* s_pxDialog_SpringStrength;
	static Asura_Dialog* s_pxDialog_StringLength;
	static Asura_Dialog* s_pxDialog_VertexWeights;
	
	static Asura_Dialog* s_pxDialog_X1;
	static Asura_Dialog* s_pxDialog_Y1;
	static Asura_Dialog* s_pxDialog_Z1;
	static Asura_Dialog* s_pxDialog_X2;
	static Asura_Dialog* s_pxDialog_Y2;
	static Asura_Dialog* s_pxDialog_Z2;
	static Asura_Dialog* s_pxDialog_BoneWeightGamma;
//	static Asura_Dialog* s_pxDialog_Y1;
//	static Asura_Dialog* s_pxDialog_Z1;

};

//*******************************************************************
// Inline Function Definitions
//*******************************************************************


//*******************************************************************
//
// (c) 2006 Rebellion
//
// Warning: This computer program is protected by copyright law and 
// international treaties. Unauthorized reproduction or distribution
// of this program, or any portion of it, may result in severe civil and
// criminal penalties, and will be prosecuted to the maximum extent 
// possible under the law.
//
//*******************************************************************

#endif //defined( ASURA_BOTANICAL_SUPPORT_INTERACTIVE)

#endif // _TOOLS_BOTANICALCREATION_BASICINTERACTIVE_H_
