Hi Regina,

On 27.10.2013 22:29, Regina Henschel wrote:
Hi all,

most (all?) attributes for 3D objects (scene, cube, sphere, extrude, rotate) and for the camera description (vrp, vpn, vup, distance, focal-length, projection) are optional in ODF1.2 but have no defaults. Before I suggest defaults, I want to look, what defaults AOO is using. But I'm a little bit lost in the code.

welcome ;-)

From the appearance and from some code snippets I guess this:
(1) There exists an general interpretation 1cm = 1000 units and 1 unit = 1/100mm for values without explicit unit.

Yes, as everywhere on the DrawingLayer, the unit is 1/100th mm. For 3D there is more folatingpoint than for the 2D stuff.

(2) The values in svg:viewBox of extrude and rotate are interpreted as 1/100mm, so a value of 8000 will be interpreted as 8cm. The viewBox is interpretated as x-min, y-min, width, height (as in SVG). Negative values in x-min and y-min are allowed, don't know about real numbers. (3) Cube and sphere have a default size of (5000|5000|5000). That results in a sphere with diameter 5cm and a cube with edge length 5cm. (4) Cube, sphere, and inner scene are axis aligned and centered around origin.

The objects have default sizes and tehse are pretty never changed. The normal user has no clue about 3D scenes and that he actually interacts with a 3D scene and not with a 3D object. He does not know about 'entering' a 3D scene and that he can work with different objects /And he should not have to know, that's why direct interactions with 3D scenes are allowed; it would be on us to make things more convenient and more accessible). The result is that nearly never the default sizes of default 3D objecs get changed; exceptions are objects 'converted' to 3D since here their initial sizes will vary widely.

(5) distance = 1cm and focal-length = 1cm
(6) vup = (0 | 1 | 0)
(7) vpn = (0 | 0 | r/3.5) Where r is the value from svg:width of the outermost scene in unit 1/100mm.
(8) vrp = (0 | 0 | r/3.5 + 'distance')
(9) projection = perspective

For the camera: There are initial values when an instance of a core object is created, but these will not stay for long; the 3D works by mapping the contained objects 'optimal' to the 3D scene as 2D object so that they 'touch' left/right/upper/lower bound of te 2D scene, adjusting the camera as needed. This is more intuitive for the user; he would have no clue why only a part of his 3D object is visible and what he might have done 'wrong'. Thus, these values are adjusted automatically (the whole 3D ViewTransformation is adapted to accomplish this).

(10) Camera settings, svg:width, svg:height, svg:x, and svg:y are ignored for inner scenes.

Yes

(11) The "photo" of the scene is scaled to svg:width and svg:height of the outermost scene.

The other way around: The content is rendered so that it optimally fits the selected 2D range.


Are these observations correct?

See comments. Hope this helps!
Sincerely,
    Armin


Kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to