日期:2014-05-18 浏览次数:21379 次
#include "stdafx.h"
#include <Inventor\Win\SoWin.h>
#include <Inventor\Win\viewers\SoWinExaminerViewer.h>
#include <Inventor\nodes\SoCube.h>
#include <Inventor\nodes\SoDirectionalLight.h>
#include <Inventor\nodes\SoMaterial.h>
#include <Inventor\nodes\SoPerspectiveCamera.h>
#include <Inventor\nodes\SoSeparator.h>
int main(int argc, char **argv)
{
         HWND myWindow = SoWin::init(argv[0]);
         if (myWindow == NULL)    exit(1);
        
         SoSeparator *root = new SoSeparator;
         root->ref();
         SoMaterial *myMaterial = new SoMaterial;
         myMaterial->diffuseColor.setValue(1.0, 0.0, 0.0);
         root->addChild(myMaterial);
         root->addChild(new SoCube);
        
         SoWinExaminerViewer *myViewer = new SoWinExaminerViewer(myWindow);
         myViewer->setSceneGraph(root);
         myViewer->setTitle("Examiner Viewer");
         myViewer->show();
        
         SoWin::show(myWindow);
         SoWin::mainLoop();
        
         return 0;
}
using OIV.Inventor.Win;
using OIV.Inventor.Win.Viewers;
using OIV.Inventor.Nodes;
class program{
   static void main(string[] args){
------解决方案--------------------
得自己写命名空间啊?
还不如,把include的东西都作为成员函数