Presentation is loading. Please wait.

Presentation is loading. Please wait.

ES305 Virtual Tools in Engineering Design Importing Objects 11-16-2009 Prof. Searleman

Similar presentations


Presentation on theme: "ES305 Virtual Tools in Engineering Design Importing Objects 11-16-2009 Prof. Searleman"— Presentation transcript:

1 ES305 Virtual Tools in Engineering Design Importing Objects 11-16-2009 Prof. Searleman jets@clarkson.edu

2 Overview ■ Virtools ■ 3D frames ■ Hierarchy Manager ■ 2D Frames & Displaying Text ■ Mouse Waiter & 2D Picking ■ Parameter Ops Homework: ■ Virtools Exercise 4: due 11/18 Quiz in class on Monday, 11/23

3 On/Off Details 1.BB is inactive. 2.The user presses the 1 key. On is activated, the BB performs an action and activates the Out On output (violet link). The BB is now active and will call itself every frame and perform an action until the Off input is activated. 3.The user presses the 2 key. Off is activated, the BB performs an action and activates the Out Off output (pink link). The BB is now inactive. Go back to 1.

4 A few caveats ■ Note that Switch-On-Key, once activated, will react to holding down a key as several inputs ■ Example: hit an F to go forwards 1 unit, hit B to go backwards 1 unit ■ Solution: ■ Deactivate the Switch-on-key when a key is hit ■ Run the script associated with that key ■ Reactivate Switch-on-key (possibly with a small delay)

5 Logics | Streaming | Parameter Selector ■ If In k is activated, “selected” parameter will be pIn k ■ Variable number of inputs (v) Note: The default datatype of the selected parameter is float. To change this, right click on the triangle for the parameter output “Selected” and change its datatype. The pIns will change to the new datatype.

6 BBs in Andy’s Tutorial ■ Controller | Mouse Waiter ■ Interface | 2D Picking ■ Logics | Calculator | Op ■ Parameters & ParamOp ■ Logics | Text | 2D Text ■ Controller | Keyboard Controller

7 Selecting an Object Detects mouse actions : Mouse Position is in screen coords delete unused pOuts, bOuts Note the “S” (can edit settings) also see Mouse Controller Also note – can see the object that was picked using a shortcut in trace mode

8 Controller|Mouse Waiter detects mouse actions note: -Mouse Position is in screen coords - delete unused pOuts, bOuts, …0

9 Interface|2DPicking returns the 3D entity, the normal and the exact position of the 2D mouse pick

10 Displaying Text 2D Frame used to display text Create Font BB typically in Level Script Use copy/paste-as-shortcut to use the font in another script

11 ParamOp ■ Parameter operations are used to perform a computation ■ ParamOps have 2 input parameters & 1 output parameter (no target) ParamOp is part of the data flow (blue), not the behavior flow (red) ParamOp is part of the data flow (blue), not the behavior flow (red)

12 Create ParamOp ■ Right-click on script ■ Select “Add Parameter Operation”

13 Logics\Calculator|Op BB ■ Encapsulates a ParamOp in a BB ■ Use to perform an operation once at a given time

14 Parameters ■ Input parameters, in blue ■ Output parameters, in green ■ Local parameters, in red Parameter shortcuts (copy; paste as shortcut)

15 Interface | Text | 2D Text

16 Controllers | Keyboard Emulates a joystick Maps keys to Joystick messages, as follows: Num 8 -> Joy_Up Num 2 -> Joy_Down Num 4 -> Joy_Left Num 6 -> Joy_Right Insert -> Button 1 Home -> Button 2 Prior -> Button 3 Delete -> Button 4 End -> Button 5 Next -> Button 6


Download ppt "ES305 Virtual Tools in Engineering Design Importing Objects 11-16-2009 Prof. Searleman"

Similar presentations


Ads by Google