
Hi Bill,
What am I missing here? I just updated SVN, uncommented the line to show the 3D box tool and rebuilt.
If it's too unconvenient to manually uncomment the line you can just press X or Shift-F4 to activate the tool (although then the icon in the toolbox won't be visible, of course).
But I can't seem to figure out how to get the tool to do anything other than draw an axis aligned rectangle.
Check out
http://www.rzuser.uni-heidelberg.de/~malbert/core_functionality.shtml
for a description of the envisaged behaviour of the tool (paragraph #1 explains how to create a box). Note that each 3D box is associated with a certain 'perspective', which is given by the positions/directions of the three vanishing points (VPs) together with their respective states (which in turn can be 'infinite' or 'finite', meaning that perspective lines in the direction of the VPs are either parallel or meet in the VP).
Currently VPs are not draggable yet, thus an initial fixed perspective is created in box3d-context.cpp, lines 120-132. For each VP both a location on the canvas and a direction is specified. These determine the behaviour of perspective lines towards this VP for each of the states 'finite'/'infinite'.
Notice that the directions specified in box3d-context.cpp for the VPs in X- and Y-direction are 'left' and 'up', respectively, and that their states are both VP_INFINITE. That's why opposite sides of the rectangle you create are parallel (i.e. don't meet in a finite VP) and axis-aligned. You can play with different directions or initial states for the VPs to observe the effect this has (unfortunately, this needs recompiling because the perspective is hard-coded at the moment).
Now the axis aligned rectangle you see only represents one face of the box. To extrude the box and make it appear 3D, press Shift once the front face is created (but keep holding the mouse button). This fixes the front face and starts dragging the remaining faces in Z direction.
As I said, the initial states of all three VPs are 'infinite'. But when you activate the 3D box tool you will observe three small unfilled squares on the canvas. These indicate the positions of the VPs if their state would be 'finite'. Although at the current stage VPs are not draggable, it is possible to toggle their states by pressing the buttons in the 3D box toolbar (they are rather easy to overlook; each one simply shows two parallel lines, but the tooltips should be more meaningful). When the state is toggled to 'finite', the square representing the VP is color-filled and corresponding edges of newly created boxes are now drawn along perspective lines meeting in that VP. Toggling it back to 'infinite' unfills the square and draws edges parallel again. I know that it's rather unintuitive to have the squares for the VPs shown on the canvas but boxes ignore them when they are white. But since the VP-machinery needs to be rewritten anyway (very soon hopefully), I didn't want to invest a lot of time to make static VPs work more beautifully.
I hope this makes things a bit clearer. Don't hesitate to ask if something still remains cryptic. And your feedback is very welcome.
Best regards, Max