How to build VTK for iPhone? - iphone

I'm trying to make an iPhone/iPad application that uses VTK to visualize DICOM images and present them on the screen. The problem is no matter what I do, I am not able to build VTK to work on the device (it works correctly on the simulator).
Is there any way to build VTK for the iPhone/iPad?
Thank you very much for your help! :)

VTK can render using the Open GL API, or more recently Manta. The iPhone (and other devices such as Android) use OpenGL ES, which is essentially a subset of OpenGL targeted at embedded systems. Until VTK is ported to use OpenGL ES as an alternative backend it will not be possible to use VTK on mobile devices. I am not familiar with the iPhone simulator, but I imagine that VTK is still able to use OpenGL in the simulator. Porting is possible, but it would not be a trivial thing to do.

Remove the tag -DIOS_SIMULATOR_ARCHITECTURES=''
Just use below:
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_FRAMEWORK_INSTALL_PREFIX=$prefix/lib -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DVTK_IOS_BUILD=ON -DModule_vtkFiltersModeling=ON ..

Related

iOS only 3D engine/SDK for C++

I'm researching which engine/sdk I should use for 3D iOS development in C++
Although there have been questions like this, I haven't found the best solution for my requirements so I'm looking forward to hear your experiences.
Unity and UDK are not what I'm looking for, due to lack of control.
Shiva3D looks interesting but don't need the extra editor
ninevehgl no skinned models and no C++
Marmalade perfect but multi-platform not required
requirements:
licensed or open source, preferably licensed which means a more extended sdk/engine
iOS iPhone/iPad, multi platform with android not preferred.
fast loading of both rigid and skinned/rigged 3d models
C++
My current choice would be Marmalade which I have been testing for a while now but I've had some issues where results differ from device to device so that's why i prefer an iOS only option. And most games I see using Marmalade are just using it to port an existing iOS app to android and not publishing to iOS.
Perhaps you can try PowerVR Insider SDK.
It contains an app framework
It's in C++
It contains modules to load 3d models
Nice math lib with vector and matrix support
http://www.imgtec.com/powervr/insider/powervr-insider.asp
Also consider cocos3d library. It is free and robust for iPad/iPhone and utilizes OpenGLES 1.1/2.0. You can load models from Wavefront OBJ format or directly into the interface.

Play SWF files one the iPhone

I am new to the iPhone development, I need to develop application in which I can load SWF files (shock wave file). I have done lots of research but I couldn't get it to work. How do I load it on the iPhone ? if it's not possible, what alternatives do I have ?
There is no Flash player on iOS and no other solution to play Flash in your app. However, you might want to look into Adobe AIR for iOS which is able to produce iOS apps.
The iPhone doesn't support flash.
iOS Doesn't support Flash so you won't be able to launch a swf. If you have the source for the SWF you could consider building an ios app through Flash CS5+. Also, you could try porting it to haxe, which is very similar to actionscript and should allow you to build for both Android and iOS at once.
As I know there is no such application (expect Frash, which is only available on jailbroken iPhones) which can load SWF Files on an iPhone.
The only way you can go is to convert that file in an iPhone readable format, which I can't recommend as the results are normally horrible.
Otherwise I suggest to recode the behaviour of that SWF File in Objective C or something similar to that.
There is no Flash player in iOS. Even more – it is forbidden by Apple iOS Developer Agreement to deploy them (and other technologies where you may use an app to execute another executable code of any kind (SWF, Java, AIR, etc.) on iOS devices.
You can also make your own flash player.

Game development using Unity for iPhone

I have decided to use the game engine Unity to develop my game for iPhone. But I need to use some functions built into the iOS SDK.
If I choose to develop using Unity, can I still use functions from the standard iOS SDK? Like functions to access a url, etc...
When you compile a Unity project for iOS it takes your C# or JavaScript code and AOT compiles it to a native dll. It then creates an xcode project which loads that dll. You can add native objectiveC, or C/C++ functions to this project and expose them for calling from the Unity engine.
http://unity3d.com/support/documentation/Manual/Plugins.html
Unity also has built-in methods for accessing URLs.
I don't know how the Unity SDK is built, but if it's a static Objective-C library then you can access iOS SDK functions without any problems. If its a script engine where you develop your scripts outside the IDE then you may not access iOS function.
Have you checked other engines/sdk's for your game development? I know that Cocos2D is well documented and I know for sure that you can call iOS methods.
Good luck!
I used both unity3d and corona which are very good at their field, and yes you can use all standart SDK over them, sometimes you need to do tricks though (which is quite a pain). If you are developing a 3d game and familiar with NVIDIA PhysX engine go for unity, it gives you nice features. But if you are clueless about collasions/rigidbodies/ragdolls etc you would have a hard time for sure.
As for 2d application development since I don't like Objective-C I prefer corona which you code in lua (easy to learn and use). You can use most of the IOS SDK in it without any problem.
I really reccomend you starting with Unity, it is the best engine I have ever used (I have used a ton of bad engines).
Unity is the best place to start and to stay. Coding, graphics and everything is simple to manage in this engine.
Unity is specially 3d but you can also build 2d games, some examples are Zombieville and OMG Pirates (very succesfull games on the appstore).

Can you run a blender game on an iphone or droid?

I have an iPhone and am getting the Droid and was wondering if blender games can run on either of them. I have already made a game and want to be able to use it on my phone.
****UPDATE****
I was wrong, just recently android support has been added but it's brand spanking new so just know that android support would be considered beta quality if that, perhaps even alpha.
I can't believe no one has given this answer:
http://code.google.com/p/gamekit/
Supports the logic bricks/python scripts etc so basically you can just load up your packaged blend file and you're good to go.
there is actually a book on how to integrate blender into a iphone game development workflow. it uses sio2 for the game engine on the iphone. it might be worth to give it a shot.

Going from the iPhone to the Mac?

Note: This is the opposite direction to most similar questions!
I have an iPhone application which I would like to provide a demo of on the Mac. How hard is it to recompile (or rewrite) iPhone applications into Mac applications, assuming I intend to keep the same screen size, and not worry about making my application look "mac-like"?
Is it possible to distribute the iPhone simulator apple provides in the iPhone SDK with a copy of my application? Asking people to go and install it themselves seems like a major requirement.
On the whole most of the "core" frameworks are present on the Mac too. As a rule of thimb, any class starting NS will be present on the desktop - NSString, NSArray and NSObject etc. That hopefully means that all of your engine code will simply recompile and run.
The same is true of some middleware - all of iPhone Quartz will be present - classes and types starting CG... If you use 3D, there is OpenGL on the desktop but it is full OpenGL rather than the iPhone's OpenGL ES. There are some differences but your code will be pretty easy to port.
Where you will definitely need to recode is the UI. Not only because AppKit is not present but because the UI design you need for iPhone will generally not work on the desktop. The iPhone supports multitouch and does not have (meaningful) overlapping windows. Similarly, if you use any of the iPhone's hardware you will have to reimplement - the accelerometer and GPS are obviously not available on the desktop. In both these cases, the rule of thumb is that classes starting UI... are specific to the iPhone.
If you follow Apple's MVC design guidelines when you write your app, if will keep the UI related code well seperated from the engine code and porting should be easier.
First, you can't distribute the iPhone simulator. That's out of the question. The iPhone SDK agreement states:
You agree not to rent, lease, lend, upload to or host on any website or server, sell, redistribute, or sublicense the SDK, in whole or in part, or to enable others to do so.
You might be able to use parts of your program in the Mac version, but you'll probably have to rewrite UI-related code.
If your app is mostly OpenGL or custom views, probably not too hard at all. If your app using lots of UIKit views, then you will need to rewrite quite a bit to use the Mac standard Cocoa views instead. They are quite different.