diff --git a/Specs/Scene/Batched3DModel3DTileContentSpec.js b/Specs/Scene/Batched3DModel3DTileContentSpec.js index 255fd33acbb9..23a84361de6c 100644 --- a/Specs/Scene/Batched3DModel3DTileContentSpec.js +++ b/Specs/Scene/Batched3DModel3DTileContentSpec.js @@ -4,6 +4,7 @@ defineSuite([ 'Core/Cartesian3', 'Core/deprecationWarning', 'Core/HeadingPitchRange', + 'Core/HeadingPitchRoll', 'Core/Transforms', 'Specs/Cesium3DTilesTester', 'Specs/createScene' @@ -12,6 +13,7 @@ defineSuite([ Cartesian3, deprecationWarning, HeadingPitchRange, + HeadingPitchRoll, Transforms, Cesium3DTilesTester, createScene) { @@ -169,7 +171,8 @@ defineSuite([ var newLongitude = -1.31962; var newLatitude = 0.698874; var newCenter = Cartesian3.fromRadians(newLongitude, newLatitude, 0.0); - var newTransform = Transforms.headingPitchRollToFixedFrame(newCenter, 0.0, 0.0, 0.0); + var newHPR = new HeadingPitchRoll(); + var newTransform = Transforms.headingPitchRollToFixedFrame(newCenter, newHPR); // Update tile transform tileset._root.transform = newTransform; diff --git a/Specs/Scene/Cesium3DTileSpec.js b/Specs/Scene/Cesium3DTileSpec.js index 3eb4bf3a0e98..806db5c39227 100644 --- a/Specs/Scene/Cesium3DTileSpec.js +++ b/Specs/Scene/Cesium3DTileSpec.js @@ -4,6 +4,7 @@ defineSuite([ 'Core/Cartesian3', 'Core/clone', 'Core/defined', + 'Core/HeadingPitchRoll', 'Core/Math', 'Core/Matrix3', 'Core/Matrix4', @@ -18,6 +19,7 @@ defineSuite([ Cartesian3, clone, defined, + HeadingPitchRoll, CesiumMath, Matrix3, Matrix4, @@ -136,7 +138,8 @@ defineSuite([ function getTileTransform(longitude, latitude) { var transformCenter = Cartesian3.fromRadians(longitude, latitude, 0.0); - var transformMatrix = Transforms.headingPitchRollToFixedFrame(transformCenter, 0.0, 0.0, 0.0); + var hpr = new HeadingPitchRoll(); + var transformMatrix = Transforms.headingPitchRollToFixedFrame(transformCenter, hpr); return Matrix4.pack(transformMatrix, new Array(16)); } diff --git a/Specs/Scene/EllipsoidPrimitiveSpec.js b/Specs/Scene/EllipsoidPrimitiveSpec.js index 764ea7575424..f0927d332a54 100644 --- a/Specs/Scene/EllipsoidPrimitiveSpec.js +++ b/Specs/Scene/EllipsoidPrimitiveSpec.js @@ -55,7 +55,7 @@ defineSuite([ var e = new EllipsoidPrimitive({ center : new Cartesian3(1.0, 2.0, 3.0), radii : new Cartesian3(4.0, 5.0, 6.0), - modelMatrix : Matrix4.fromScale(2.0), + modelMatrix : Matrix4.fromUniformScale(2.0), show : false, material : material, id : 'id', @@ -64,7 +64,7 @@ defineSuite([ expect(e.center).toEqual(new Cartesian3(1.0, 2.0, 3.0)); expect(e.radii).toEqual(new Cartesian3(4.0, 5.0, 6.0)); - expect(e.modelMatrix).toEqual(Matrix4.fromScale(2.0)); + expect(e.modelMatrix).toEqual(Matrix4.fromUniformScale(2.0)); expect(e.show).toEqual(false); expect(e.material).toBe(material); expect(e.id).toEqual('id'); diff --git a/Specs/Scene/Instanced3DModel3DTileContentSpec.js b/Specs/Scene/Instanced3DModel3DTileContentSpec.js index d6326f5be6d6..4b73c42d0dcb 100644 --- a/Specs/Scene/Instanced3DModel3DTileContentSpec.js +++ b/Specs/Scene/Instanced3DModel3DTileContentSpec.js @@ -3,6 +3,7 @@ defineSuite([ 'Scene/Instanced3DModel3DTileContent', 'Core/Cartesian3', 'Core/HeadingPitchRange', + 'Core/HeadingPitchRoll', 'Core/Transforms', 'Scene/Cesium3DTileContentState', 'Scene/TileBoundingSphere', @@ -12,6 +13,7 @@ defineSuite([ Instanced3DModel3DTileContent, Cartesian3, HeadingPitchRange, + HeadingPitchRoll, Transforms, Cesium3DTileContentState, TileBoundingSphere, @@ -198,7 +200,8 @@ defineSuite([ var newLongitude = -1.31962; var newLatitude = 0.698874; var newCenter = Cartesian3.fromRadians(newLongitude, newLatitude, 15.0); - var newTransform = Transforms.headingPitchRollToFixedFrame(newCenter, 0.0, 0.0, 0.0); + var newHPR = new HeadingPitchRoll(); + var newTransform = Transforms.headingPitchRollToFixedFrame(newCenter, newHPR); // Update tile transform tileset._root.transform = newTransform; diff --git a/Specs/Scene/ModelInstanceCollectionSpec.js b/Specs/Scene/ModelInstanceCollectionSpec.js index 8313638afe6d..13a0c47d80d9 100644 --- a/Specs/Scene/ModelInstanceCollectionSpec.js +++ b/Specs/Scene/ModelInstanceCollectionSpec.js @@ -6,6 +6,7 @@ defineSuite([ 'Core/defaultValue', 'Core/defined', 'Core/HeadingPitchRange', + 'Core/HeadingPitchRoll', 'Core/JulianDate', 'Core/Math', 'Core/Matrix4', @@ -25,6 +26,7 @@ defineSuite([ defaultValue, defined, HeadingPitchRange, + HeadingPitchRoll, JulianDate, CesiumMath, Matrix4, @@ -127,7 +129,8 @@ defineSuite([ var heading = Math.PI/2.0; var pitch = 0.0; var roll = 0.0; - var modelMatrix = Transforms.headingPitchRollToFixedFrame(position, heading, pitch, roll); + var hpr = new HeadingPitchRoll(heading, pitch, roll); + var modelMatrix = Transforms.headingPitchRollToFixedFrame(position, hpr); instances.push({ modelMatrix : modelMatrix }); diff --git a/Specs/Scene/PointCloud3DTileContentSpec.js b/Specs/Scene/PointCloud3DTileContentSpec.js index 04d4f5af13ac..6710109a50a0 100644 --- a/Specs/Scene/PointCloud3DTileContentSpec.js +++ b/Specs/Scene/PointCloud3DTileContentSpec.js @@ -6,6 +6,7 @@ defineSuite([ 'Core/ComponentDatatype', 'Core/defined', 'Core/HeadingPitchRange', + 'Core/HeadingPitchRoll', 'Core/Transforms', 'Scene/Cesium3DTileStyle', 'Scene/Expression', @@ -18,6 +19,7 @@ defineSuite([ ComponentDatatype, defined, HeadingPitchRange, + HeadingPitchRoll, Transforms, Cesium3DTileStyle, Expression, @@ -233,7 +235,8 @@ defineSuite([ var newLongitude = -1.31962; var newLatitude = 0.698874; var newCenter = Cartesian3.fromRadians(newLongitude, newLatitude, 5.0); - var newTransform = Transforms.headingPitchRollToFixedFrame(newCenter, 0.0, 0.0, 0.0); + var newHPR = new HeadingPitchRoll(); + var newTransform = Transforms.headingPitchRollToFixedFrame(newCenter, newHPR); // Update tile transform tileset._root.transform = newTransform;