Skip to content

Commit 9dd1380

Browse files
committed
Remove GeometryPipeline.computeBinormalAndTangent for 1.31
1 parent 961911c commit 9dd1380

File tree

3 files changed

+1
-67
lines changed

3 files changed

+1
-67
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Change Log
1111
* Breaking changes
1212
* Corrected spelling of `Color.FUCHSIA` from `Color.FUSCHIA`. [#4977](https://github.com/AnalyticalGraphicsInc/cesium/pull/4977)
1313
* The enums `MIDDLE_DOUBLE_CLICK` and `RIGHT_DOUBLE_CLICK` from `ScreenSpaceEventType` have been removed. [#5052](https://github.com/AnalyticalGraphicsInc/cesium/pull/5052)
14+
* Removed the function `GeometryPipeline.computeBinormalAndTangent`. Use `GeometryPipeline.computeTangentAndBitangent`. [#5053](https://github.com/AnalyticalGraphicsInc/cesium/pull/5053)
1415
* Added support to `DebugCameraPrimitive` to draw multifrustum planes. The attribute `debugShowFrustumPlanes` of `Scene` and `frustumPlanes` of `CesiumInspector` toggles this. `FrameState` has been augmented to include `frustumSplits` which is a `Number[]` of the near/far planes of the camera frustums.
1516
* Enable rendering `GroundPrimitives` on hardware without the `EXT_frag_depth` extension; however, this could cause artifacts for certain viewing angles.
1617
* Always outline KML line extrusions so that they show up properly in 2D and other straight down views.

Source/Core/GeometryPipeline.js

-28
Original file line numberDiff line numberDiff line change
@@ -1352,34 +1352,6 @@ define([
13521352
return geometry;
13531353
};
13541354

1355-
/**
1356-
* Computes per-vertex binormal and tangents for a geometry containing <code>TRIANGLES</code>.
1357-
* The result is new <code>binormal</code> and <code>tangent</code> attributes added to the geometry.
1358-
* This assumes a counter-clockwise winding order.
1359-
* <p>
1360-
* Based on <a href="http://www.terathon.com/code/tangent.html">Computing Tangent Space Basis Vectors
1361-
* for an Arbitrary Mesh</a> by Eric Lengyel.
1362-
* </p>
1363-
*
1364-
* @param {Geometry} geometry The geometry to modify.
1365-
* @returns {Geometry} The modified <code>geometry</code> argument with the computed <code>binormal</code> and <code>tangent</code> attributes.
1366-
*
1367-
* @exception {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
1368-
* @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
1369-
*
1370-
* @example
1371-
* Cesium.GeometryPipeline.computeBinormalAndTangent(geometry);
1372-
*
1373-
* @see GeometryPipeline.computeTangentAndBitangent
1374-
*/
1375-
GeometryPipeline.computeBinormalAndTangent = function(geometry) {
1376-
deprecationWarning('computeBinormalAndTangent', 'computeBinormalAndTangent was deprecated in 1.30. It will be removed in 1.31. Use a computeTangentAndBitangent.');
1377-
GeometryPipeline.computeTangentAndBitangent(geometry);
1378-
geometry.attributes.binormal = geometry.attributes.bitangent;
1379-
1380-
return geometry;
1381-
};
1382-
13831355
var scratchCartesian2 = new Cartesian2();
13841356
var toEncode1 = new Cartesian3();
13851357
var toEncode2 = new Cartesian3();

Specs/Core/GeometryPipelineSpec.js

-39
Original file line numberDiff line numberDiff line change
@@ -1712,45 +1712,6 @@ defineSuite([
17121712
}
17131713
});
17141714

1715-
it ('computeBinormalAndTangent computes tangent and binormal for BoxGeometry', function() {
1716-
// This test is for the deprecated computeBinormalAndTangent API
1717-
// It tests to assert that the binormal attribute is set correctly and
1718-
// is a copy of the bitangent attribute
1719-
var geometry = BoxGeometry.createGeometry(new BoxGeometry({
1720-
vertexFormat : new VertexFormat({
1721-
position : true,
1722-
normal : true,
1723-
st : true
1724-
}),
1725-
maximum : new Cartesian3(250000.0, 250000.0, 250000.0),
1726-
minimum : new Cartesian3(-250000.0, -250000.0, -250000.0)
1727-
}));
1728-
geometry = GeometryPipeline.computeBinormalAndTangent(geometry);
1729-
var actualTangents = geometry.attributes.tangent.values;
1730-
var actualBinormals = geometry.attributes.binormal.values;
1731-
1732-
var expectedGeometry = BoxGeometry.createGeometry(new BoxGeometry({
1733-
vertexFormat: VertexFormat.ALL,
1734-
maximum : new Cartesian3(250000.0, 250000.0, 250000.0),
1735-
minimum : new Cartesian3(-250000.0, -250000.0, -250000.0)
1736-
}));
1737-
var expectedTangents = expectedGeometry.attributes.tangent.values;
1738-
var expectedBitangents = expectedGeometry.attributes.bitangent.values;
1739-
1740-
expect(actualTangents.length).toEqual(expectedTangents.length);
1741-
expect(actualBinormals.length).toEqual(expectedBitangents.length);
1742-
1743-
for (var i = 0; i < actualTangents.length; i += 3) {
1744-
var actual = Cartesian3.fromArray(actualTangents, i);
1745-
var expected = Cartesian3.fromArray(expectedTangents, i);
1746-
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON1);
1747-
1748-
actual = Cartesian3.fromArray(actualBinormals, i);
1749-
expected = Cartesian3.fromArray(expectedBitangents, i);
1750-
expect(actual).toEqualEpsilon(expected, CesiumMath.EPSILON1);
1751-
}
1752-
});
1753-
17541715
it('compressVertices throws without geometry', function() {
17551716
expect(function() {
17561717
return GeometryPipeline.compressVertices();

0 commit comments

Comments
 (0)