Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
How to store objects in Alice?
Old
jay_goh
Guest
 
Status:
Posts: n/a
Default How to store objects in Alice? - 07-06-2007, 01:38 AM

I'm computer science student from Malaysia which is interested in doing research on Alice. Currently i have the Alice version 2.0 and I'm interested in finding how Alice stores those 3D objects .So, may i know that what are the classes and methods that responsible to store objects.

And if I separate an object into different parts, how do i join those parts together and which classes and methods are responsible to do that?

Thank you and this is quite urgent.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 07-06-2007, 02:54 PM

I don't know how helpful this will be, but I will give it a try.

To begin with, objects apparently exist only within a world file (extension a2w) For example, as far as I know, there is no such thing as a serialized object file as in Java, for example.

An a2w file is an archive file that you can open using WinZip and other similar programs. When you do, you will see that it contains a collection of xml files, txt files, py (presumeably Python) files, png (image) files, bin files, and possibly some other file types as well. Most and perhaps all of the bin files seem to be named vertices.bin and indices.bin, suggesting that they contain the information that describes the 3D shape of an object as a series of joined triangular surfaces.

These files are separated into different directories, and the names of the directories seem to match the various parts of the objects (upper leg, lower leg, foot, etc.).

I don't know how the information in these world files is used to construct an object when you load a world into the Alice runtime environment.

Similarly, the closest thing to a class file in Alice seems to be a file with the extension a2c. This is also an archive file that can be opened using WinZip. These archive files seem to contain the same types of files as those that are contained in a world file. For example, if you compare the contents of the file in the gallery named IceSkater.a2c with a world file that contains an IceSkater object, a large number of the files seem to be the same. In other words, a world file seems to contain some or all of the files from the a2c file for an object that is contained in the world.

Given that information, I still don't know how the contents of an a2c file are used to construct an object and add it to the world.

So all in all, this probably wasn't very helpful with respect to your objective, but maybe it will provide a starting point for your investigation.

Dick Baldwin

Last edited by DickBaldwin; 07-06-2007 at 02:56 PM. Reason: Correct grammar errors
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.