Download presentation
Presentation is loading. Please wait.
Published bySilvester Sparks Modified over 9 years ago
1
Classes and Objects Copyright 2014 Wanda Dann, Don Slater All rights reserved
2
An Alice World Classes Objects
3
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.
4
this The current scene is known as “this” scene
5
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.
6
Where the program for the animation or game is written Code Editor
7
Click on Setup Scene to go to the Scene Editor Go to Scene Editor
8
Scene Editor Where the scene for the animation or game is created Gallery panel, organized by class hierarchy
9
Video: 02. Gallery Tour An Overview of the Alice 3 Gallery and Classes
10
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
11
An Alice class is similar to an architect's blueprint for building a house. ◦ Not the actual house -- just a plan for constructing a new house, based on a sketch of what it will look like.
12
An instance of a class is an object The following slides illustrate how to create (construct) a new object in an Alice scene.
13
Gallery panels The gallery tabs provide alternate organization schemes
14
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)
15
Video: 03. Adding Objects An Overview adding an object to an Alice Project
16
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
17
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
18
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
19
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
20
Enter a name for the new BabyDragon object Adding a DragonBaby object to a Scene
21
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
22
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
23
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.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.