move ExplititEuler cloth solver to its own file, so it can be replaced by PDB, implicit euler etc

add wireframe toggle ('w' key)
add --paused command-line option to start simulation in paused mode
render cloth using drawPoints method
This commit is contained in:
erwincoumans
2013-09-06 18:09:35 -07:00
parent d0faea90f9
commit 8faac34801
8 changed files with 183 additions and 97 deletions

View File

@@ -192,9 +192,22 @@ static void MyMouseButtonCallback(int button, int state, float x, float y)
}
extern bool useShadowMap;
bool useWireFrame = false;
void MyKeyboardCallback(int key, int state)
{
if (key=='w' && state)
{
useWireFrame = !useWireFrame;
if (useWireFrame)
{
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
} else
{
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
}
if (key=='s' && state)
{
useShadowMap=!useShadowMap;