Classes and Objects
Copyright 2014 Wanda Dann, Don SlaterAll rights reserved
An Alice World
Classes
Objects
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.
this
The current scene is known as “this” scene
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.
Where the program for
the animation or
game is written
Code Editor
Click on Setup
Scene to go to the Scene Editor
Go to Scene Editor
Scene Editor
Where the scene for the animation or
game is created
Gallery panel, organized by class hierarchy
Video: 02. Gallery TourAn Overview of the Alice 3 Gallery and Classes
Each 3D model is a pre-written classIn Alice, a class defines
◦ A plan for constructing a new object in an Alice scene
◦ Actions an object of that class can perform
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.
An instance of a class is an objectThe following slides illustrate how to create
(construct) a new object in an Alice scene.
Gallery panels
The gallery tabs provide alternate organization schemes
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)
Video: 03. Adding ObjectsAn Overview adding an object to an Alice Project
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
• 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
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
• 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
Enter a name for the new BabyDragon object
Adding a DragonBaby object to a Scene
• 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
• 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
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.