#pragma once


#include <ExampleApplication.h>
#include <OgreNewt.h>


class OgreNewtonApplication :
	public ExampleApplication
{
public:
	OgreNewtonApplication(void);
	~OgreNewtonApplication(void);

protected:
	void createFrameListener();
	void createScene();

	void destroyScene();


private:

	// our custom function to simplify making simple dynamics rigid body boxes.
	OgreNewt::Body* makeSimpleBox( Ogre::Vector3 size, Ogre::Vector3 pos, Ogre::Quaternion orient, const char* materialName );

	// build a simple jenga
	void buildJenga (Ogre::Vector3 pos, int heightCount);

	// build a simple pyramid stack
	void buildPyramid (Ogre::Vector3 boxsize, Ogre::Vector3 pos, Ogre::Quaternion orient, int heightCount);

	OgreNewt::World* m_World;
	
	Ogre::FrameListener* mNewtonListener;

	int mEntityCount;

};

