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

Fix for default scale of oriented bounding box #6147

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Change Log
* Fixed applying a translucent style to a point cloud tileset. [#6113](https://github.com/AnalyticalGraphicsInc/cesium/pull/6113)
* Fixed sandcastle Particle System example for better visual [#6132](https://github.com/AnalyticalGraphicsInc/cesium/pull/6132)
* Fixed camera movement and look functions for 2D mode [#5884](https://github.com/AnalyticalGraphicsInc/cesium/issues/5884)
* Fixed discrepancy between default value used and commented value for default value for halfAxes of OrientedBoundingBox. [#6147](https://github.com/AnalyticalGraphicsInc/cesium/pull/6147)

### 1.41 - 2018-01-02

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/OrientedBoundingBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define([
*
* @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
* @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
* Equivalently, the transformation matrix, to rotate and scale a 2x2x2
* Equivalently, the transformation matrix, to rotate and scale a 0x0x0
* cube centered at the origin.
*
*
Expand All @@ -66,7 +66,7 @@ define([
/**
* The transformation matrix, to rotate the box to the right position.
* @type {Matrix3}
* @default {@link Matrix3.IDENTITY}
* @default {@link Matrix3.ZERO}
*/
this.halfAxes = Matrix3.clone(defaultValue(halfAxes, Matrix3.ZERO));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the changes here should be reversed. The doc is correct, but Matrix3.ZERO should be Matrix3.IDENTITY.

2x2x2 is correct because the half axes are 1x1x1 but the full cube is 2x2x2.

}
Expand Down