projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4716247
)
0025331: Visualization - method V3d_View::ConvertWithProj returns incorrect value
author
osa
<osa@opencascade.com>
Mon, 6 Oct 2014 15:07:35 +0000
(19:07 +0400)
committer
bugmaster
<bugmaster@opencascade.com>
Thu, 9 Oct 2014 12:02:14 +0000
(16:02 +0400)
src/V3d/V3d_View.cxx
patch
|
blob
|
blame
|
history
diff --git
a/src/V3d/V3d_View.cxx
b/src/V3d/V3d_View.cxx
index
eea29d8
..
e63ec0f
100644
(file)
--- a/
src/V3d/V3d_View.cxx
+++ b/
src/V3d/V3d_View.cxx
@@
-1896,9
+1896,15
@@
void V3d_View::ConvertWithProj(const Standard_Integer Xp,
aResult = myCamera->UnProject (gp_Pnt (anX, anY, aZ - 10.0));
- Dx = X - aResult.X();
- Dy = Y - aResult.Y();
- Dz = Z - aResult.Z();
+ Graphic3d_Vec3d aNormDir;
+ aNormDir.x() = X - aResult.X();
+ aNormDir.y() = Y - aResult.Y();
+ aNormDir.z() = Z - aResult.Z();
+ aNormDir.Normalize();
+
+ Dx = aNormDir.x();
+ Dy = aNormDir.y();
+ Dz = aNormDir.z();
if( MyViewer->Grid()->IsActive() ) {
Graphic3d_Vertex aNewVrp = Compute (aVrp) ;