Skip to content

Commit d22e21c

Browse files
authored
Merge pull request #6913 from AnalyticalGraphicsInc/fix-planes
Fix plane model matrix calculation
2 parents 021405f + be0399a commit d22e21c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Source/DataSources/PlaneGeometryUpdater.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ define([
264264
Cartesian3.normalize(transformedNormal, transformedNormal);
265265

266266
var up = ellipsoid.geodeticSurfaceNormal(translation, scratchAxis2);
267-
if (Cartesian3.equalsEpsilon(up, transformedNormal, CesiumMath.EPSILON8)) {
267+
if (CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(up, transformedNormal)), 1.0, CesiumMath.EPSILON8)) {
268268
up = Cartesian3.clone(Cartesian3.UNIT_Z, up);
269269
}
270270

@@ -285,5 +285,10 @@ define([
285285
return Matrix4.fromTranslationQuaternionRotationScale(translation, rotation, scale, result);
286286
}
287287

288+
/**
289+
* @private
290+
*/
291+
PlaneGeometryUpdater.createPrimitiveMatrix = createPrimitiveMatrix;
292+
288293
return PlaneGeometryUpdater;
289294
});

0 commit comments

Comments
 (0)