Hi Armin,

it seems, I was not precise enough. My question here is not about what AOO does when using the UI or what is needed for normal user. My question is, what defaults are used, if AOO gets a file, where these attributes are not defined. (Of cause, such files have to be written manually. I've created a lot of them in the meantime.) The spec allows to omit these attributes. But currently the spec gives no default values. Therefor my goal is, to suggest default values to be used in the spec so, that they align with the default values used in AOO, when opening such files.

Can you please look through my points again in the light of missing attributes in the file?


Armin Le Grand schrieb:
     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.

Changing 2D points to floating point is issue https://tools.oasis-open.org/issues/browse/OFFICE-386


(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.

But their size can be set in file format directly, without any transformation. The problems with that in AOO are in bugs https://issues.apache.org/ooo/show_bug.cgi?id=123561 and https://issues.apache.org/ooo/show_bug.cgi?id=123542.

 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).

So when distance, focal-length, vup, vpn, and vrp are not given in the file, then the default values for them depend on the content of the scene?


(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!

Not in all cases, see my comment at the beginning.

Kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to