I have to develop an application like these sites in flex 4
http://mydeco.com/rooms/austin/
http://floorplanner.com/demo#assets
http://www.homestyler.com/designer
I have the following questions:
- Which are the main flex components used to build these type of application?
- How the conversion from 2D to 3D ?
- How to generate dynamic 3D from the 2D resizable objects?
- How to show measurement on resizing the objects?
Buttons, groups, lists, checkboxes, etc... Feel free using flex components ;) To be serious, these apps use almost all the standard flex controls.
It's the most difficult question on your list. Writing your own 3d actionscript rederer is enormous difficult task. You have 2 general opportunities:
To use an existing 3d software engine: What is the best Actionscript3 3D Engine?
To use Molehill API supported by Flash Player 11: http://www.adobe.com/devnet/flashplayer/stage3d.html
Molehill API provides hardware-accelerated 3d graphics, but is a relatively new feature. There is a little number of engines supporting it:
http://alternativaplatform.com/en/
http://code.google.com/p/minimole/
There is no common recipe for the issue. Actually 2D projections and 3D previews are different representation of one model. These programs have generators of 3d procedural (i.e. defined by formulas) models of walls, stairs, etc. and may be additional 2d models. Formulas inside these models create polygons/vector drawings. Of course, all formulas are heuristic. For walls, for example, you can create a poly line, then create an outline for it, then extrude the outline using z-axis.
It's heuristic too. For walls you just measure distance between corners, for shelves/wardrobes you may use sizes of their bounding boxes.