#include "obj.h"

//--------------------------------------------------------------
void obj::setup(){	 
  
 
  //load some obj files from disk
  crane.loadFile("crane.obj");

}


//--------------------------------------------------------------
void obj::draw(){
  //draw in middle of the screen
  //glTranslatef(ofGetWidth()/2,ofGetHeight()/2,0);

  //tumble according to mouse
 // glRotatef(mouseY,1,0,0);
 // glRotatef(mouseX,0,1,0);

  //scale large enough to see the model
  float s = min(ofGetWidth(),ofGetHeight())*0.4;
  glScalef(s,s,s);

  //draw the model
  glColor4f(0.5,1,0,0.4);//lime color
  crane.fillFaces();//first the faces
  
  glColor4f(0,0.8,0,1);//outline
  crane.outlineFaces();//then the edges.
  
  /*
    wanna see the vertices?
    glColor4f(1,0,0,1);
    glPointSize(2);
    crane.pointVertices();
  */
  
}

