You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it is today the origin of the ClippingPlane coordinate system for a 3DTileset is set from the center of the boundingsphere of the root tile of the tileset. For a large tileset this can be a rather arbitrary point, not easily related to the individual objects in the tileset and not well known to the client.
The tileset clipping origin transform is also only accessible trough a private and undocumented property of the tileset, and the only way I have found to use my_preferred_clipping_origin_matrix is to set the clipping plane collection modelMatrix to the difference between my matrix and the tileset clippingPlanesOriginMatrix like this: const scratch_invert = Matrix4(); Cesium.Matrix4.inverse(tileset.clippingPlanesOriginMatrix, scratch_invert); Cesium.Matrix4.multiply(scratch_invert, my_preferred_clipping_origin_matrix, tileset.clippingPlanes.modelMatrix);
If there is a better way I would have liked an example in the ClippingPlaneCollection documentation. If not, I would have liked a possibility to set the tileset clippingPlanesOriginMatrix on tileset creation, using the root tile origin only when this is not provided. let tileset = await Cesium.Cesium3DTileset.fromUrl( my_tileset_urll, { dynamicScreenSpaceError: true, clippingPlanesOriginMatrix: Matrix4.IDENTITY } );
The text was updated successfully, but these errors were encountered:
Feature
As it is today the origin of the ClippingPlane coordinate system for a 3DTileset is set from the center of the boundingsphere of the root tile of the tileset. For a large tileset this can be a rather arbitrary point, not easily related to the individual objects in the tileset and not well known to the client.
The tileset clipping origin transform is also only accessible trough a private and undocumented property of the tileset, and the only way I have found to use
my_preferred_clipping_origin_matrix
is to set the clipping plane collection modelMatrix to the difference between my matrix and the tileset clippingPlanesOriginMatrix like this:const scratch_invert = Matrix4(); Cesium.Matrix4.inverse(tileset.clippingPlanesOriginMatrix, scratch_invert); Cesium.Matrix4.multiply(scratch_invert, my_preferred_clipping_origin_matrix, tileset.clippingPlanes.modelMatrix);
If there is a better way I would have liked an example in the ClippingPlaneCollection documentation. If not, I would have liked a possibility to set the tileset clippingPlanesOriginMatrix on tileset creation, using the root tile origin only when this is not provided.
let tileset = await Cesium.Cesium3DTileset.fromUrl( my_tileset_urll, { dynamicScreenSpaceError: true, clippingPlanesOriginMatrix: Matrix4.IDENTITY } );
The text was updated successfully, but these errors were encountered: