opus-world-wind
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -8,2 +8,3 @@ define([ | ||
'WebWorldWind/geom/Vec3', | ||
'WebWorldWind/geom/Matrix', | ||
'WebWorldWind/geom/Plane', | ||
@@ -13,4 +14,5 @@ 'WebWorldWind/geom/Line', | ||
'OpusWorldWind/Intersection' | ||
], function(OpusWorldWind, WorldWind, Globe, Globe2D, Angle, Vec3, Plane, Line, Position, Intersection) { | ||
], function(OpusWorldWind, WorldWind, Globe, Globe2D, Angle, Vec3, Matrix, Plane, Line, Position, Intersection) { | ||
var ExtUtils = { | ||
scratchMatrix: Matrix.fromIdentity(), | ||
convertWorldWindPositionAltitudeMode: function(wwd, position, fromAltitudeMode, toAltitudeMode) { | ||
@@ -150,8 +152,11 @@ if(fromAltitudeMode === toAltitudeMode || toAltitudeMode === WorldWind.CLAMP_TO_GROUND) { | ||
rayFromScreenPoint: function(dc, screenPoint, result) { | ||
this.scratchMatrix.setToIdentity(); | ||
var modelviewProjectionInv = this.scratchMatrix; | ||
modelviewProjectionInv.invertMatrix(dc.modelviewProjection); | ||
var p1 = new Vec3(screenPoint[0], screenPoint[1], 0); | ||
var p2 = new Vec3(screenPoint[0], screenPoint[1], 1); | ||
if(!dc.unProject(p1, result.origin)) { | ||
if(!modelviewProjectionInv.unProject(p1, dc.viewport, result.origin)) { | ||
return null; | ||
} | ||
if(!dc.unProject(p2, result.direction)) { | ||
if(!modelviewProjectionInv.unProject(p2, dc.viewport, result.direction)) { | ||
return null; | ||
@@ -164,2 +169,5 @@ } | ||
computeScreenRightDirection: function(dc, result) { | ||
this.scratchMatrix.setToIdentity(); | ||
var modelviewProjectionInv = this.scratchMatrix; | ||
modelviewProjectionInv.invertMatrix(dc.modelviewProjection); | ||
var p1 = new Vec3(0, 0, 0); | ||
@@ -169,6 +177,6 @@ var p2 = new Vec3(1, 0, 0); | ||
var pt2 = new Vec3(0, 0, 0); | ||
if(!dc.unProject(p1, pt1)) { | ||
if(!modelviewProjectionInv.unProject(p1, dc.viewport, pt1)) { | ||
return null; | ||
} | ||
if(!dc.unProject(p2, pt2)) { | ||
if(!modelviewProjectionInv.unProject(p2, dc.viewport, pt2)) { | ||
return null; | ||
@@ -175,0 +183,0 @@ } |
{ | ||
"name": "opus-world-wind", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "GPL-3.0", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
293210
5493