고려대학교 그래픽스 연구실 An Inventor Sampler - The Inventor mentor 고려대학교 그래픽스 연구실 2001.8.14 민 성환.

Slides:



Advertisements
Similar presentations
Chapter 16 Graphical User Interfaces
Advertisements

Chapter 12 A display model Bjarne Stroustrup
Chapter 16 Graphical User Interfaces John Keyser’s Modifications of Slides by Bjarne Stroustrup
CSC 461: Lecture 51 CSC461 Lecture 5: Simple OpenGL Program Objectives: Discuss a simple program Discuss a simple program Introduce the OpenGL program.
OpenGL and Projections
3-D Geometry.
Java 3D Pablo Figueroa University of Alberta April 2000.
Hierarchical Transformations Hierarchical Models Scene Graphs
Basic 3D Graphics Chapter 5. Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph,
3-D Modeling Concepts V part 2.
V part 2 Obtained from a Guildford County workshop- Summer, 2014.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
Chapter 8: String Manipulation
Programming with Microsoft Visual Basic th Edition
Variables and Functions Chapter Variables Named storage location in computer’s memory Programs may need to store data when running o Stored in.
Modeling and Animation with 3DS MAX R 3.1 Graphics Lab. Korea Univ. Reference URL :
Introduction to 3D Computer Graphics and Virtual Reality McConnell text.
AMI GUI Design V1.1 by Kilian Pohl - Reflects changes in AMI MRML Structure - Includes feedback from AMI Workshop in Dec 09.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Chapter 8: Writing Graphical User Interfaces
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
GLWidget Description Jason Goffeney 3/8/2006. GLWidget The GLWidget class extends the Qt QGLWidget. The QGLWidget is a Qt Widget that happens to have.
Adobe Flash CS4 – Illustrated Unit C: Using Symbols and the Library Panel.
Using OpenGL in Visual C++ Opengl32.dll and glu32.dll should be in the system folder Opengl32.dll and glu32.dll should be in the system folder Opengl32.lib.
Chapter 3: Using GUI Objects and the Visual Studio IDE.
FLTK Tutorial.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
1 Useful Tools for Making Video Games Part V An overview of.
V part C.  Different programs have different ways of displaying objects in real-time while the scenes are being created within the workspace. Some.
3D Intro. 3D Technology Progression G-4 G-4
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
Open Inventor A short introduction. Capabilities of Open Inventor Easy construction of 3D scenes User interaction Animation.
1 Chapter Eleven Handling Events. 2 Objectives Learn about delegates How to create composed delegates How to handle events How to use the built-in EventHandler.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Graphic User Interface. Graphic User Interface (GUI) Most of us interact with computers using GUIs. GUIs are visual representations of the actions you.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
Learning Unity. Getting Unity
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
CS324e - Elements of Graphics and Visualization Java 3D Intro.
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
CSE 232: C++ memory management Overview of Arrays Arrays are the simplest kind of data structure –One item right after another in memory (“contiguous range”
Cameras and Light Chapter 4, The Inventor Mentor.
Page Designer Storyboard J. A. Fitzpatrick December 2004.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
When the program is first started a wizard will start to setup your Lemming App. Enter your company name and owner in the fields designated “Company Name”
Programming with Microsoft Visual Basic 2008 Fourth Edition Chapter Eight String Manipulation.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
CS552: Computer Graphics Lecture 6: Viewing in 2D.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Applying Actions 강 신 진
고려대학교 그래픽스 연구실 Cameras and Lights - The Inventor mentor 고려대학교 그래픽스 연구실 민 성환.
Design Visualization Software Introduction / Review.
UNIT 11: 3D AutoCAD Objectives: How to print or plot a drawing How to setup a layout using title blocks and viewports Create and manage new layouts Be.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 4 – Object Manipulation in VRML.
Chapter 4: Do-It-Yourself Designing (Designing Interfaces)
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
3-D Modeling Concepts V part 2.
Quick Intro to Unity Lecture 2.
MPEG-4 Binary Information for Scenes (BIFS)
3-D Modeling Concepts V part 2.
More on Graphical User Interfaces
Nodes and Groups Lee Young Gun Open Inventor.
3-D Modeling Concepts V part B.
3-D Modeling Concepts V part 2.
Presentation transcript:

고려대학교 그래픽스 연구실 An Inventor Sampler - The Inventor mentor 고려대학교 그래픽스 연구실 민 성환

23 December 2015Sunghwan Min 2 Install Guide  Inv252.exe 를 실행  XF-OIKEY.COM 을 커멘트라인으로 실행시켜 버전을 2.5 용 key,expire 날짜,host id 얻어낸다.  시작메뉴의 TGS open inventor 항목에서 license Admin 실행  Version 을 2.5 로 하고 key,expire 날짜,host id 를 넣고 apply 한다  이전버젼과의 호환을 위해 dll 들을 system 폴더에 복사한 다.  리부팅한다.

23 December 2015Sunghwan Min 3 Build IVF Viewer  Visual studio 를 실행  New 를 클릭하면 project 탭 하위에 IVF appWizard 를 선택  Step 5 에서 생성될 Viewer 옵션을 선택한다.  컴파일후 실행

23 December 2015Sunghwan Min 4 “Hello, Cone”  This chapter begins with a set of sample programs that illustrate the key aspects of Inventor  Example 2-1  Creates a red cone and then renders it in a window  Use Inventor Xt window  Construct a simple scene graph composed of camera node, a light node, a material node, and a cone node  The purpose of this chapter  Simply to convey a feel for the tools Inventor

23 December 2015Sunghwan Min 5 A Red Cone  Basic steps  1. Create a window where the scene will be rendered  2. Build the scene graph by creating property and shape node and combining them into groups

23 December 2015Sunghwan Min 6 A Red Cone (cont.) #include #ifdef WIN32 #define main ivMain #endif Void main(int, char **argv) { // Initialize Inventor. This returns a main window to use. // If unsuccessful, exit. Widget myWindow = SoXt::init(argv[0]); // pass the app name if (myWindow == NULL) exit(1); // Make a scene containing a red cone SoSeparator *root = new SoSeparator; SoPerspectiveCamera *myCamera = new SoPerspectiveCamera; SoMaterial *myMaterial = new SoMaterial; root->ref(); root->addChild(myCamera); root->addChild(new SoDirectionalLight);

23 December 2015Sunghwan Min 7 A Red Cone (cont.) myMaterial->diffuseColor.setValue(1.0, 0.0, 0.0); // Red root->addChild(myMaterial); root->addChild(new SoCone); // Create a renderArea in which to see our scene graph. // The render area will appear within the main window. SoXtRenderArea *myRenderArea = new SoXtRenderArea(myWindow); // Make myCamera see everything. myCamera->viewAll(root, myRenderArea->getViewportRegion()); // Put our scene in myRenderArea, change the title myRenderArea->setSceneGraph(root); myRenderArea->setTitle("Hello Cone"); myRenderArea->show(); SoXt::show(myWindow); // Display main window SoXt::mainLoop(); // Main Inventor event loop }

23 December 2015Sunghwan Min 8 To Make the Cone Spin  How to use engines to make the cone spin  The engine changes the angle value in the rotationXYZ node in response to changes in the real-time clock  Example 2-2

23 December 2015Sunghwan Min 9 “Hello,Cone” Using Engines  추가된 코드 // This transformation is modified to rotate the cone SoRotationXYZ *myRotXYZ = new SoRotationXYZ; root->addChild(myRotXYZ); // An engine rotates the object. The output of myCounter // is the time in seconds since the program started. // Connect this output to the angle field of myRotXYZ myRotXYZ->axis = SoRotationXYZ::X; // rotate about X axis SoElapsedTime *myCounter = new SoElapsedTime; myRotXYZ->angle.connectFrom(&myCounter->timeOut);

23 December 2015Sunghwan Min 10 Adding a Trackball Manipulator  The next two examples show additional methods for editing a node in the scene graph  Add manipulator to the first example  When left mouse button is pressed on the trackball,it highlights itself in a different color to show it is active  While it is active, the mouse can be used to rotate the trackball and the object  In this example, a trackball is constructed instead of the SoRotationXYZ node  Render area has a sensor attached to the scene graph, the scene is automatically rendered again after each edit

23 December 2015Sunghwan Min 11 Adding a Trackball Manipulator (cont.) Void main(int, char **argv) { // Initialize Inventor and Xt Widget myWindow = SoXt::init(argv[0]); if (myWindow == NULL) exit(1); SoSeparator *root = new SoSeparator; root->ref(); SoPerspectiveCamera *myCamera = new SoPerspectiveCamera; root->addChild(myCamera); // child 0 root->addChild(new SoDirectionalLight); // child 1 root->addChild(new SoTrackballManip); // child 2 SoMaterial *myMaterial = new SoMaterial; myMaterial->diffuseColor.setValue(1.0, 0.0, 0.0); root->addChild(myMaterial); root->addChild(new SoCone); SoXtRenderArea *myRenderArea = new SoXtRenderArea(myWindow); myCamera->viewAll(root, myRenderArea->getViewportRegion()); myRenderArea->setSceneGraph(root); myRenderArea->setTitle("Trackball"); myRenderArea->show(); SoXt::show(myWindow); SoXt::mainLoop(); }

23 December 2015Sunghwan Min 12 Examiner Viewer  It provides a user interface that allow use of the mouse to modify camera placement in the scene  Does not need to set up a camera and call viewAll() because the viewer does this automatically

23 December 2015Sunghwan Min 13 A Red Cone (cont.) Void main(int, char **argv) { Widget myWindow = SoXt::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 SoCone); // Set up viewer: SoXtExaminerViewer *myViewer = new SoXtExaminerViewer(myWindow); myViewer->setSceneGraph(root); myViewer->setTitle("Examiner Viewer"); myViewer->show(); SoXt::show(myWindow); SoXt::mainLoop(); }

23 December 2015Sunghwan Min 14 Naming Conventions  Sb  Basic types (for scene basic)  SbColor, SbViewVolume  So  All other classes in Inventor ( for scene object)  SoCone,SoPerspectiveCamera,SoMaterial,SoTransform  Methods and variables begin with a owercase letter  getNormal(),setSceneGraph()  Enumerated type values  FILLED,PER_PART

23 December 2015Sunghwan Min 15 Scene Basic Types SbBool Boolean value SbBoxnx 2D or 3D box SbColor RGB color value SbCylinder cylinder SbLine directed 3D line SbMatrix 4x4 matrix SbName character string SbPList list of generic pointer SbPlane oriented 3D plane SbRotation representation of a 3D rotation about an arbitrary axis SbSphere sphere SbString “smart” character strings that have many convenience method SbTime representation of time Sb Vecnx 2D or 3D vector SbViewportRegion active viewport region within a display window SbViewVolume view volume

23 December 2015Sunghwan Min 16 Method  Each Sb class has useful operators associated with it SbVec3f v(1.0,2.0,3.0); V.normalize()  Fields  Store parameters for nodes  A field contains a value of a certain type  Coordinate Systems  Right-hand  Angles are specified in radians