#include <Inventor/SoDB.h>
#include <Inventor/SoInput.h>
#include <Inventor/Xt/SoXt.h>
#include <Inventor/Xt/viewers/SoXtExaminerViewer.h>
#include <Inventor/nodes/SoSeparator.h>
#include <math.h>
#include <Inventor/nodes/SoCone.h>
#include <Inventor/nodes/SoDirectionalLight.h>
#include <Inventor/nodes/SoMaterial.h>
 



void
main(int argc, char **argv)
{
   // Initialize Inventor and Xt
   Widget myWindow = SoXt::init(argv[0]);

   if (myWindow == NULL) exit(1);  
   SoSeparator *root = new SoSeparator;
   SoMaterial *myMaterial = new SoMaterial;
   root->ref();
   root->addChild(new SoDirectionalLight);
   myMaterial->diffuseColor.setValue(0.0, 1.0, 0.0);   //Green 
   root->addChild(myMaterial);
   root->addChild(new SoCone);
 
 

   // Create a viewer
   SoXtExaminerViewer *myViewer = 
            new SoXtExaminerViewer(myWindow);

   // attach and show viewer
   myViewer->setSceneGraph(root);
   myViewer->setTitle("File Reader");
   myViewer->show();
    
   // Loop forever
   SoXt::show(myWindow);
   SoXt::mainLoop();
}

