! Hilfe !
- email an Kuk Hwan Mieusset oder Maia Engeli.
- Jeweils Mittwoch ab 12:00 im E29, Fragestunde mit Kuk Hwan und/oder Maia.
- "Open Inventor Nodes Quick Reference" für die Nodes
- Man-Pages für die Header-Files
- Online Books für Code Beispiele

Abgabetermin für die Übung ist der 30. Januar.


0. FILES KOPIEREN


1. FILES VORBEREITEN


2. NEUER CODE SCHREIBEN

In student.c++ seht ihr auch die Stelle, wo Ihr neuen Code einfügen könnt.
   // ------------ADD-SOME-ACTION-HERE----------------------------------------
Was Ihr da schreibt wird jedesmal ausgeführt, wenn Euer Objekt selektiert wird.
Alles was als child von action eingefügt wird ist nicht permantent, es verschwindet wieder, wenn das Objekt deselektiert wird.
Was aber sonstwo in den Scenegraph eingebaut wird ist eine bleibende Veränderung.


Beispiel 1: Nicht permantentes Einfügen von Text

am Anfange de Files:
#include <Inventor/nodes/SoFont.h>
#include <Inventor/nodes/SoText2.h>
in der Funktion student::selectAction()
	    // Choose a font
    SoFont *myFont = new SoFont;
    myFont->name.setValue("Times-Roman");
    myFont->size.setValue(48.0);
    action->addChild(myFont);
    
	    // add a Seperator so that the translation is not applied to the object
    SoSeparator *infoSep = new SoSeparator;
       
	    // Translation so that the string is in front of the object
    SoTransform *infoTrans = new SoTransform;
       
	    // TEXT2 = screen alligned text, no change in size, no rotation
    SoText2 *infoText = new SoText2;
    infoTrans->translation.setValue(.25,3, 0);
    infoText->string = "hommage a tinguely";
    infoText->justification.setValue(SoText2::RIGHT);

    infoSep->addChild(infoTrans);
    infoSep->addChild(infoText);
    action->addChild(infoSep);

Beispiel 2: Bleibende Verschiebung

    SoTransform *move = new SoTransform;
    move->translation.setValue(-1.0,.0,.0);
    selected->insertChild(move, 1);

3. ABGEBEN

wie bei der vorherigen Übung 3 Files abgeben:

cp student_bitmap.h /homes1/prog/abgabe/exercise12/yourname_bitmap.h
cp student.h /homes1/prog/abgabe/exercise12/yourname.h
cp student.c++ /homes1prog/abgabe/exercise12/yourname.c++



















This website has been archived and is no longer maintained.