1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0024001: Stereographic rendering support

Deleted TODOs which were used when branch was built without OpenCL.
Modified test case bugs/vis/bug23747_2 (changed textured shape)
This commit is contained in:
duv
2014-01-23 14:44:31 +04:00
committed by bugmaster
parent 1190746b3c
commit b5ac8292b0
99 changed files with 5345 additions and 7308 deletions

View File

@@ -135,6 +135,7 @@ void CAnimationView3D::OnInitialUpdate()
aViewer = GetDocument()->GetViewer();
aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
myView = aViewer->CreateView();
// store for restore state after rotation (witch is in Degenerated mode)
@@ -156,8 +157,6 @@ void CAnimationView3D::OnInitialUpdate()
/* I suspect another problem elsewhere */
::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ;
myPView = Handle(V3d_PerspectiveView)::DownCast (myView);
m_Tune.Create ( IDD_TUNE , NULL ) ;
RECT dlgrect;
@@ -892,37 +891,37 @@ void CAnimationView3D::Twist (int x , int /*y*/)
myView->SetTwist (a) ;
}
void CAnimationView3D::SetFocal(double dFocus,double dAngle)
//=============================================================================
// function: SetFocal
// purpose:
//=============================================================================
void CAnimationView3D::SetFocal (double theFocus, double theAngle)
{
double v [3] ;
double l ;
int i ;
v [0] = m_Atx - m_Eyex ;
v [1] = m_Aty - m_Eyey ;
v [2] = m_Atz - m_Eyez ;
Handle(Graphic3d_Camera) aCamera = myView->Camera();
l = sqrt ( v[0]*v[0] + v[1]*v[1] + v[2]*v[2] ) ;
if ( l > 1.e-3 ) {
for ( i=0 ; i<3 ; i++ )
v [i] = v [i] / l * dFocus ;
gp_Pnt anAt = aCamera->Center();
gp_Pnt anEye = aCamera->Eye();
m_Focus = dFocus ;
gp_Vec aLook (anAt, anEye);
m_Atx = v [0] + m_Eyex ;
m_Aty = v [1] + m_Eyey ;
m_Atz = v [2] + m_Eyez ;
if (aCamera->Distance() > 1.e-3)
{
aLook = aLook / aCamera->Distance() * theFocus;
myView->SetImmediateUpdate ( Standard_False ) ;
myView->SetAt ( m_Atx , m_Aty , m_Atz ) ;
m_dAngle = dAngle ;
dAngle = dAngle * M_PI / 180. ;
myPView->SetAngle ( dAngle ) ;
dAngle = myPView->Angle () ;
m_Focus = theFocus;
myView->SetImmediateUpdate ( Standard_True ) ;
myView->Update ();
}
anAt.SetX (aLook.X() + anEye.X());
anAt.SetY (aLook.Y() + anEye.Y());
anAt.SetZ (aLook.Z() + anEye.Z());
m_dAngle = theAngle;
aCamera->SetCenter (anAt);
aCamera->SetFOVy (theAngle);
myView->Update();
}
}
void CAnimationView3D::ReloadData()
@@ -958,9 +957,9 @@ void CAnimationView3D::ReloadData()
dy = m_Aty - m_Eyey ;
dz = m_Atz - m_Eyez ;
m_Focus = sqrt ( dx * dx + dy * dy + dz * dz ) ;
m_dAngle = myPView->Angle () ;
m_dAngle = m_dAngle * 180. / M_PI ;
m_Focus = sqrt (dx * dx + dy * dy + dz * dz);
m_dAngle = myView->Camera()->FOVy();
m_Tune.m_dAngle = m_dAngle ;
m_Tune.m_dFocus = m_Focus ;

View File

@@ -59,7 +59,7 @@ public:
void SetDimensions ();
void ReloadData();
CTune m_Tune;
void SetFocal ( double dFocus , double dAngle );
void SetFocal (double theFocus, double theAngle);
void Fly (int x , int y);
void Turn (int x , int y);
void Roll (int x , int y);
@@ -138,8 +138,6 @@ private:
Quantity_Factor myCurZoom;
Standard_Boolean myHlrModeIsOn;
Handle_V3d_PerspectiveView myPView;
View3D_CurrentAction myCurrentMode;
double m_Atx , m_Aty , m_Atz ;
double m_Eyex , m_Eyey , m_Eyez ;

View File

@@ -210,7 +210,6 @@ enum CurrentAction3d {
#include "HLRAlgo_Projector.hxx"
#include "Aspect_MarkMap.hxx"
#include <V3d_PerspectiveView.hxx>
#include <Geom_BSplineSurface.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Solid.hxx>