Tuesday, January 18, 2011

18 January 2011

Started working on the comparison feature for our application today. We are able to instantiate another eaglView inside our current view. However, when the drawing of the model in the second eaglView starts, the program crashes when it tries to execute the codes in the c++ library that we are using.

Hence, we suspected that it was the c++ library's problem, but we cannot say that we are sure though. Then, we tried the same thing on an older project that we have. For this project however, we were able to do the proper drawing of the model in the second eaglView. Would have to spend some time looking further into this tomorrow.

By the way, Zac's iPhone app just got approved today. Go search for it on the iTunes app store! Just type in "photo album scrapbook" and you'll be able to find his app.

Monday, January 17, 2011

17 January 2011

We continued with fixing and implementing several interface features today. First, we did the fix for multiple downloading of models from the Dropbox repository. We were actually working on the fix to properly display the right UIButtons when download is completed.

Then we moved on to implement the swipe to delete feature in the UITableView for the list of downloaded models. This also makes thing more efficient when we want to test the program. This way, we would not have to uninstall the application from the simulator.

The next thing we did was to change the display of the labels to show something similar to the UICallOutView. Since the UICallOutView in the SDK is not documented by Apple, we did not want to take the risk of having this application being rejected when sent for reviews in the future.

Hence, we worked an alternative approach, which is to make use of custom buttons. We would create an image similar to the UICallOutView in Photoshop and apply that image to the button. Zac and I struggled a little here and there with Photoshop, but we managed to create the image in the end. Oh and a note, in order to implement some paddings for the text in UIButtons, there is this function:

[nodeButton setTitleEdgeInsets:UIEdgeInsetsMake(10, 15, 20, 20)];

Kevin then came in at the end of the day, and we discussed on what to do next. We decided to remove the "show all labels" feature since we already have a table view that shows all the nodes' names.

To do:
- Model Comparison
- Mirror Effects (multiple iPads on the same network, Bonjour)

Fix multiple download. Fix delete. Do callout view. Photoshop problems.

Friday, January 14, 2011

14 January 2011

Showed Kevin what we have done for the Dropbox implementation. He then got us to fix several issues, mostly to do with the design of the interface. Learnt quite a bit on the adding of items to UITableViewCell, such as spinners and our custom buttons.

Thursday, January 13, 2011

13 January 2011

Got the directory for saving the models and text files right :) we are supposed to save all the downloaded files into the NSDocumentDirectory. Once that was done, we were able to download and read the text files easily too.

While Zac worked on displaying the node descriptions, I worked on the UI for displaying the online models list. Managed to get the UI done properly for the iPhone as well as the iPad. While doing that, I found a better way to make use of tools bars programmatically. Instead of created our own UIToolBar, do this:

UIBarButtonItem *onlineModelsButton = [[UIBarButtonItem alloc] initWithTitle:@"Online Models" style:UIBarButtonItemStyleBordered target:self action:@selector(viewOnlineModels)];
[self setToolbarItems:[NSArray arrayWithObject:onlineModelsButton]];
[self.navigationController setToolbarHidden:NO animated:NO];

Was having some issues with displaying a modal view inside a UIPopover. Got to read some sources online and it was said that apple doesn't recommend that. Instead, I decided to have a popover display another popover view. It worked out pretty nicely.

We got the login page done up nicely too! :D

Wednesday, January 12, 2011

12 January 2011

Continued with the fixing of the pan gesture for translation, but to no avail.

Kevin came in before lunch and talked to us about several new features that is to be done. Hopefully this would work towards our advantage for the extension. Anyway, we first listed down the items to be fixed:

- Translation in explode view
- Rotation (some angles could not be covered)
- Label locations

We would be implementing an online upload/download feature with the use of Dropbox API. We have decided to put all the 3D models inside a Dropbox folder, as well as their respective text files that stores individual node descriptions.

We managed to get the downloading of the 3D models up pretty quickly. Most of the time taken was spent on understanding the sample application provided. They made use of a lot of delegation, which made the understanding process a little tougher.

Though the downloading was done, we are still having some problems with the location to save the files. I was able to save it into the mainBundle, but seems like this is being restricted by Apple. Got to find the actual directory for saving tomorrow.

Tuesday, January 11, 2011

11 January 2011

A nice date today, 11.1.11. :)

Continued with the fixing of the pan gesture for translation. Reviewed the whole algorithm to see what we have missed out, or what went wrong, but still could not get any idea. In the end, I realized that we made a mistake while trying to retrieve the camera's z position after we did the explode. We added an extra value to the camera's z position while doing that, which caused the nodes to translate more that they should. It is more accurate now, but still not at the level we want yet.

Gonna have to try and figure out the problem tomorrow...

Monday, January 10, 2011

10 January 2011

Continued with researching on the center of models in OpenGL ES. Chanced upon this link, and it gave us most of our answers.

http://forums.create.msdn.com/forums/p/56669/345580.aspx

The pivots that we have set up in 3DS Max only works in modeling tools. In order to have our own pivot point in OpenGL ES, we would have to store that information ourself. We did, however, find a solution to the object's center, only when the model is not being exploded. This can be done easily by just setting the scene's center to (0, 0, 0) in 3DS Max.

Now, the problem is, how do we define where our pivot point in our code when every model is different?

We brought this issue up to Kevin, and came to a conclusion that the center of the models would have to be defined by the modeler when he/she creates the models. Whatever point the vertices of the model centers upon would be defined as the center by OpenGL ES. This would solve the issue when models are being exploded.

Then, we moved on to improve the algorithm for the explode feature. The previous algorithm translates the nodes by a certain value, and because of this, some nodes would appear to be out of the screen. We solved this by zooming the camera out by the largest translation distance of the nodes in the scene. While doing that, we also worked to improve the circle algorithm that we have based on some of my suggestions. This made the explode look nicer.

Then, with the improved explode feature, we realized that the translation was not working properly again. The translation values seems to be getting larger the longer we pan around.