1 / 22

Objects and Properties

Alice. Objects and Properties. Objects in Alice. Objects already exist. Hundreds of them. Objects. In the demo worlds, the octopus and skater are objects . An " object " is anything that can be identified as unique from other things How is an object identified as unique? has a name

reilly
Download Presentation

Objects and Properties

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Alice Objects and Properties

  2. Objects in Alice • Objects already exist. Hundreds of them

  3. Objects • In the demo worlds, the octopus and skater are objects. • An "object" is • anything that can be identified as unique from other things • How is an object identified as unique? • has a name • has properties: • width, height, color, location, age, ss#, id# • has a purpose: • associated actions it can perform • tasks it can carry out

  4. Objects in a Virtual World • In Alice, each 3D model is a class of objects • each object of the class has a unique name • mummy, mummy1, mummy2 • has color(s) • pink, white, grey, black, blue, ….

  5. Objects in the World • Can have multiple instances of objects from the same class in the World • class: like a cookie cutter • objects: like the cookies star cookie cutterstar cookie class star cookiesstar cookie objects

  6. Objects in the World penguin class penguin objects in a virtual world

  7. Object Dimensions • Objects in Alice worlds are 3 dimensional height width depth

  8. Objects “Know” Relative Directions • Yellow box around penguin is itsbounding box • light blue line is up/down • pink line is left/right • dark blue line isforward backward • DEMO

  9. Galleries of 3D Objects • Sources of 3D objects • the local gallery shipped with the software • Alice web gallery

  10. Objects in a Virtual World • In Alice, each 3D model is a class of objects • class: penguin • objects: penguin, penguin2, penguin3

  11. Problem • Suppose I want a Penguin to disappear from the screen during the animation.

  12. Solution • The solution is to change the opacity (degree of transparency) while the animation is running. • Opacity is a property of the penguin object. • All objects in Alice have properties, which include (among others): • location (x, y, z) • orientation • color • opacity • vehicle

  13. Changing Properties of Objects • Properties of Object can be changed • Location can be changed by clicking and moving object • Orientation can be changed in the “Add Objects” View • Other properties, such as color, can be changed in the properties window when the object is selected

  14. Object Parts • Objects may be composed of parts • which may in turn be composed of parts • the whole object may be told to do something or an individual part

  15. Object Parts • Objects may be composed of parts

  16. 3D objects • A 3D object has • 3 dimensions • height, width, depth • 6 degrees of freedom (directions of movement)

  17. Distance • object’s distance from each other are based on the distance between their center points • may look like objects are zero distance away, but actually centers still some positive distance away

  18. Position in the World • The world in an Alice program models a 3D space • every object in the world has a positionx, y, z, coordinate relative to the center of the world • ground starts at center of world • axes (green = up, red = right, blue = forward)

  19. Vehicles • Each object has a vehicle property • Initially the world is the vehicle for objects • can change this by altering the vehicle property for an object • Give the snowman an instrument • Change “ahem” to “toot” • What happens when movie played?

  20. Alter the Vehicle Property Select sax from object tree Select properties tab Change vehicle from world to snowman

  21. Assignment • Read Tutorial03 • Know what an object is instance of • Know how to use the properties • Read Tips & Techniques 2 • Orientation and Movement Instructions

  22. Lab 03 • 3a) Penguin • 3b) Tortoise and the cookie • 3c) Mana and the magnet

More Related