Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"3dtile model adjust angle for tileset" how to do it #7166

Closed
binfenshijie opened this issue Oct 18, 2018 · 7 comments
Closed

"3dtile model adjust angle for tileset" how to do it #7166

binfenshijie opened this issue Oct 18, 2018 · 7 comments

Comments

@binfenshijie
Copy link

var m = tileset_test.modelMatrix;
var m1 = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(RotateY));
Cesium.Matrix4.multiplyByMatrix3(m,m1,m);
tileset_test.modelMatrix = m;

example:
http://cesium.xin/wordpress/archives/106
but now it do not work for 1.4 or heigher
now how to do it
thanks

@binfenshijie
Copy link
Author

psbktk2xyy78gfovrinlr i

just adjust it,because the building is crooked.......

the tileset_test is that:

var tileset_test = cesiumLayer.getCesiumScene().primitives.add(new Cesium.Cesium3DTileset(
{
url: 'modeldata/3dtile_ping/tileset.json',
modelMatrix:Cesium.Matrix4.IDENTITY
}));

tileset_test.readyPromise.then(function () {
var boundingSphere = tileset_test.boundingSphere;
cesiumLayer.getCesiumScene().camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0.0, -0.1, boundingSphere.radius));
cesiumLayer.getCesiumScene().camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
}).otherwise(function (error) {
throw (error);
});

@hpinkos
Copy link
Contributor

hpinkos commented Oct 18, 2018

Hello @binfenshijie, yes you should be able to set the tileset modelMatrix to place the tileset

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
    url: 'tileset/url'
}));

tileset.readyPromise.then(function(tileset) {
    tileset.modelMatrix = // compute model matrix
}).otherwise(function(error) {
    console.log(error);
});

We have a tileset position tool for positioning tilesets tiled on Cesium ion. Find out more at https://www.cesium.com
Alternatively we have the same tool available for purchase as part of the Cesium ion SDK. Send an email to [email protected] for details.

@hpinkos hpinkos closed this as completed Oct 18, 2018
@lilleyse
Copy link
Contributor

Given that this sounds like a regression, this might be related to #6755 (comment) and
#7036.

@binfenshijie
Copy link
Author

Given that this sounds like a regression, this might be related to #6755 (comment) and
#7036.

yes, same question....

but i really can not understand the English better....
and i want to know how to change my code for example :

var m = tileset_test.modelMatrix;
var m1 = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(RotateX));
Cesium.Matrix4.multiplyByMatrix3(m,m1,m);
 tileset_test.modelMatrix = m;

you can give some code for me????

@binfenshijie
Copy link
Author

any one can help????@lilleyse

@lilleyse
Copy link
Contributor

@binfenshijie sorry we don't have a fix for this yet. The only workaround at the moment involves modifying the Cesium source code. The code change is described here: #6755 (comment).

@binfenshijie
Copy link
Author

@binfenshijie sorry we don't have a fix for this yet. The only workaround at the moment involves modifying the Cesium source code. The code change is described here: #6755 (comment).

get it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants