TEXT FILEs:
DATA FILEs:
Includes the createTransformPath() function which creates a path to the transform node that affects the tail of the input path. The three possible cases are:
(This is excerpted from the Inventor Mentor, volume 1, chapter 15, example 3.)
When the user picks on the SoWrapperKit (lamp), the kit's "transform" part is replaced with an SoTransformBoxManip. Alternatively, when the user picks the sphere, the sphere's associated transform is replaced by an SoHandleBoxManip. Picking the cube causes an SoTrackballManip to replace the cube's transform.
Manipulator callbacks are used to change the color of the object being manipulated.
Note that for illustration purposes, the cube and SoWrapperKit already have transform nodes associated with them; the sphere does not. In all cases, the routine createTransformPath() is used to find the transform node that affects the picked object.
(This is excerpted from the Inventor Mentor, volume 1, chapter 15, example 3.)
This program illustrates a simple Inventor program which reads in an Inventor file and views it with the `Walkthrough viewer'.
EXERCISE::
This program illustrates a simple Inventor program which reads in an Inventor file and views it with the `Walkthrough viewer'. If the `Table' is picked then play some audio...
EXERCISE:
(Hint: you will need to create a boolean flag for the lamp status...)
This program illustrates a simple Inventor program which reads
in an Inventor file and views it with the `Walkthrough viewer'.
If the `Table' is picked then play some audio...
If the `lamp' is picked then play some audio...
EXERCISE:
Hint: Find the named object `LampSwitch' in the file...
This program illustrates a simple Inventor program which reads in an Inventor file and views it with the `Walkthrough viewer'. If the `lamp' is picked then play some audio and turn the light on/off...
EXERCISE:
Hint: Find the SoRotor `TableRotor' in scene.iv and turn it on when the table is picked...