View Full Version : Group objects...

06-09-2009, 02:07 PM
Something I saw was missing in Alice is the ability of creating composite objects; objects created by combining other object. This would be a great addition to Alice. With this feature you can use Alice for creating new models (instead of the cumbersome process of creating and importing ASE files) with built-in features.

Please, if not for this release of Alice, consider this feature for future releases.... Thanks

[Note to admin: I posted this message by mistake in the "Alice 3.0 Discussion" section of this forum]

06-19-2009, 06:47 PM
Agreed, I think this would be great. I imagine the interface would be awkward for specifying certain spatial things, rotation axes, etc. But even then it would be extremely useful.

06-19-2009, 10:59 PM
If this feature is not going to be available in Alice 3.0, those using Alice+Java may be able to emulate it programmatically.

You could take the references to instances of the objects making a group into an array/vector/list, and add an additional invisible object (like a box) whose center will act as the point of reference for group rotations. In Alice terms, this invisible object would be the value for the argument 'as seen by' when rotating each object.

A more elegant way could be to create a subclass of Model (or some other more appropriate class..Composite class?), for example; define methods to add and remove models from the group, and overwrite the appropriate existing/inherited methods. I have not looked at the source code so I am not sure which class could be the appropriate base class to inherit from --I just took a quick look at the classes in the org.alice.apis.moveandturn package.