1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025265: Perspective projection - selecting front point of two

This commit is contained in:
apl
2014-10-14 15:47:34 +04:00
committed by bugmaster
parent 0644bfa483
commit ba4feb7629
2 changed files with 76 additions and 2 deletions

View File

@@ -454,10 +454,10 @@ gp_Lin Select3D_Projector::Shoot (const Standard_Real theX, const Standard_Real
return gp_Lin();
}
Graphic3d_Vec4d aVPnt1 = aProjInv * Graphic3d_Vec4d (theX, theY, 0.0, 1.0);
Graphic3d_Vec4d aVPnt1 = aProjInv * Graphic3d_Vec4d (theX, theY, 0.0, 1.0);
Graphic3d_Vec4d aVPnt2 = aProjInv * Graphic3d_Vec4d (theX, theY, 10.0, 1.0);
aVPnt1 /= aVPnt1.w();
aVPnt2 /= aVPnt1.w();
aVPnt2 /= aVPnt2.w();
gp_Vec aViewDir (aVPnt2.x() - aVPnt1.x(), aVPnt2.y() - aVPnt1.y(), aVPnt2.z() - aVPnt1.z());