Esri / i3s-spec

This repository hosts the specification for Scene Layers which are containers for arbitrarily large amounts of geographic data. The delivery and persistence model for Scene Layers, referred to as Indexed 3d Scene Layer (I3S) and Scene Layer Package (SLPK) respectively, are specified.
Other
321 stars 86 forks source link

OBB #49

Closed Shtirlic81 closed 4 years ago

Shtirlic81 commented 5 years ago

Hi, I have a couple questions:

  1. I'm not familiar with quaternion, how do I use it in order to get the correct orientation?
  2. What are the units of quaternion's members? Is it degree, degree, degree, meter?

Thanks

sreinhard commented 5 years ago

Hi,

  1. Quaternions are a common representation for 3d orientations. See https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation There are various libraries that can handle quaternions for you, eg. glMatrix has functions to transform 3d vectors (http://glmatrix.net/docs/vec3.js.html#line514) and to convert them to other representations, such as transformation matrices (http://glmatrix.net/docs/mat3.js.html#line492).

  2. The quaternion does not have units. It should always have norm 1, ie. the sum of the squares of the numbers in the quaternion is equal to 1.

Shtirlic81 commented 5 years ago

Thanks