//!
//! \file SpringSystem.h
//! \brief Interface definition for the SpringSystem class
//!
//! \author Austin McGee amcgee@digipen.edu
//! \date April 23, 2006
//!
//! Copyright 2006 DigiPen (USA) Corporation, all rights reserved.
//!
////////////////////////////////////////////////////////////////////////////////

#if !defined( __SPRINGSYSTEM_INCLUDED_20060423 )
#define __SPRINGSYSTEM_INCLUDED_20060423

#include "Spring.h"
#include "Point.h"
#include "AnchorPoint.h"
#include <vector>

// a system of springs
class SpringSystem
{

public:
	
	// constructors and destructor
	SpringSystem( void );										// default constructor
	virtual ~SpringSystem( void );								// normal destructor

	// public functions
	void MoveAnchors( const Vector3D vec, const bool first );	// move either one of the two root anchors
	void Update( const float time );							// updates the system
	void Draw( Point *line, unsigned &lineCount );				// draws the system

	// typedefs
	typedef std::vector< Spring > tSpringList;

private:

	static const int numAnchors_ = 3;							// box size
	AnchorPoint anchors_[numAnchors_][numAnchors_][numAnchors_];// the anchors needed for the cube
	AnchorPoint firstRoot_;										// the first root anchor
	AnchorPoint secondRoot_;									// the second root anchor

	tSpringList springs_;										// spring system
	D3DXCOLOR color_;											// the color to draw the model

};

#endif // __SPRINGSYSTEM_INCLUDED_20060423

