An XKTPrimitive is a triangle mesh, that has a color and an opacity. XKTPrimitives are used by XKTEntities, which each have a transform matrix. XKTTiles spatially group XKTEntitys.
This is wasteful, because in practice we often have multiple differently-colored XKTPrimitives that have the same shape, eg. a box. In that case, it means we would need to redundantly repeat that box-shaped geometry data, in order to have an object composed of differently-colored boxes.
This also means that, since an XKTEntity transforms all its XKTMeshes using the same matrix, the Local-space positions of those XKTMeshes must be nicely positioned relative to each other, ready to transform as a unit, via that matrix, into World-space.
In XKT V7, we fix this wastage like so:
Replace XKTPrimitive with XKTGeometry, which just holds geometry arrays (and a new primitive type property) ,
Introduce XKTMesh, which represents an instance of an XKTGeometry, with its own transform matrix, color and opacity
Remove the transform matrix from XKTEntity (since each XKTMesh has its own matrix)
The next version of the
XKT
file format.Improved Geometry Reuse
XKT V7
reuses geometry data in a more flexible and granular way, resulting in smaller file sizes.In
XKT V6
, the file structure is as shown below:An
XKTPrimitive
is a triangle mesh, that has a color and an opacity.XKTPrimitives
are used byXKTEntities
, which each have a transform matrix.XKTTile
s spatially groupXKTEntity
s.This is wasteful, because in practice we often have multiple differently-colored
XKTPrimitives
that have the same shape, eg. a box. In that case, it means we would need to redundantly repeat that box-shaped geometry data, in order to have an object composed of differently-colored boxes.This also means that, since an
XKTEntity
transforms all itsXKTMeshes
using the same matrix, the Local-space positions of thoseXKTMeshes
must be nicely positioned relative to each other, ready to transform as a unit, via that matrix, into World-space.In
XKT V7
, we fix this wastage like so:XKTPrimitive
withXKTGeometry
, which just holds geometry arrays (and a new primitive type property) ,XKTMesh
, which represents an instance of anXKTGeometry
, with its own transform matrix, color and opacityXKTEntity
(since eachXKTMesh
has its own matrix)New Geometry Types
Support three geometry types: "triangles", "lines" and "points"
TODO: describe
Auto-flagging watertight geometries
TODO: describe