Presentation is loading. Please wait.

Presentation is loading. Please wait.

Classes and Objects Copyright 2014 Wanda Dann, Don Slater All rights reserved.

Similar presentations


Presentation on theme: "Classes and Objects Copyright 2014 Wanda Dann, Don Slater All rights reserved."— Presentation transcript:

1 Classes and Objects Copyright 2014 Wanda Dann, Don Slater All rights reserved

2  An introductory programming course  Learning how to program in the context of animation, simulation, storytelling, and building short games.  Learn fundamental programming concepts in Alice ◦ A rapid prototyping tool ◦ Create “rough drafts” of animations, games simulations, and film-like stories Course Description

3 Video: 01. A Brief Tour An Overview of Alice 3

4  An Alice World  Classes  Objects

5 Alice World An Alice project creates a virtual world. The primary component of a world is the camera view, as shown in the Scene Editor.

6 this  The current scene is known as “this” scene

7 Components of a scene  A scene always has a camera and a ground surface (which may be grass, sand, rocks, or even water)  Other objects may be added to a scene.

8 Where the program for the animation or game is written Code Editor

9 Click on Setup Scene to go to the Scene Editor Go to Scene Editor

10 Scene Editor Where the scene for the animation or game is created Gallery panel, organized by class hierarchy

11 Video: 02. Gallery Tour An Overview of the Alice 3 Gallery and Classes

12  Each 3D model is a pre-written class  In Alice, a class defines ◦ A plan for constructing a new object in an Alice scene ◦ Actions an object of that class can perform

13  An instance of a class is an object  The following slides illustrate how to create (construct) a new object in an Alice scene.

14 Gallery panels  The gallery tabs provide alternate organization schemes

15 Class Hierarchy In this panel, classes are organized based on how objects move around in a scene. Each class folder is like a drawer in a file cabinet, where all classes of the same type are stored. Flyer (has wings and can fly) Biped (walks on 2 legs) Quadraped (walks on 4 legs) Swimmer (lives in water, swims)

16 Video: 03. Adding Objects An Overview adding an object to an Alice Project

17 Select the class folder for the type of object that you wish to add to the scene. In this example, we click on Quadruped classes. Select class folder

18 Within the Quadruped folder are classes of objects that move around on 4 legs. Each image is labeled with the name of the class and shows a preview for a new object of that class. Quadruped – walks on 4 legs

19 Click on the image to select one of 5 versions of objects that can be created by the DragonBaby class. Select class 10 different versions of DragonBaby objects

20 The DragonBaby class has 10 different paint resources. Click on one of the images to select one of the paint resources. Alice will automatically create a new DragonBaby object and paint it with the selected paint resource. Select class

21 Enter a name for the new BabyDragon object Adding a DragonBaby object to a Scene

22 We have constructed a new instance of the BabyDragon class and identified it with the name fergie. We say an instance of a class is an object. Instance/object

23 A new object may be added to a scene by clicking and dragging the image into the scene. The dialog box for naming the object will still pop up, in the same way as before. Alternate technique

24 Objects of the same class A scene may have more than one object of the same class. Example: fergie and bert are two different objects (instances) of the same BabyDragon class. Different objects have different names and may have different colors, sizes, and other properties.


Download ppt "Classes and Objects Copyright 2014 Wanda Dann, Don Slater All rights reserved."

Similar presentations


Ads by Google