mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0026676: Visualization, Ray Tracing - correct rendering if stereo pair
- Fixed interpolation of ray direction vector for asymmetric frustum (stereo left/right eye). Unnecessary normalization of direction vector affecting the frustum's geometry was removed. - Fixed usage of projection type argument passed when rendering immediate graphics with stereo projection.
This commit is contained in:
@@ -1722,17 +1722,13 @@ void OpenGl_View::updateCamera (const OpenGl_Mat4& theOrientation,
|
||||
|
||||
aDirect = aDirect - aOrigin;
|
||||
|
||||
GLdouble aInvLen = 1.0 / sqrt (aDirect.x() * aDirect.x() +
|
||||
aDirect.y() * aDirect.y() +
|
||||
aDirect.z() * aDirect.z());
|
||||
|
||||
theOrigins[aOriginIndex++] = OpenGl_Vec3 (static_cast<GLfloat> (aOrigin.x()),
|
||||
static_cast<GLfloat> (aOrigin.y()),
|
||||
static_cast<GLfloat> (aOrigin.z()));
|
||||
|
||||
theDirects[aDirectIndex++] = OpenGl_Vec3 (static_cast<GLfloat> (aDirect.x() * aInvLen),
|
||||
static_cast<GLfloat> (aDirect.y() * aInvLen),
|
||||
static_cast<GLfloat> (aDirect.z() * aInvLen));
|
||||
theDirects[aDirectIndex++] = OpenGl_Vec3 (static_cast<GLfloat> (aDirect.x()),
|
||||
static_cast<GLfloat> (aDirect.y()),
|
||||
static_cast<GLfloat> (aDirect.z()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user