//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifdef HAVE_CONFIG_H
- #include <config.h>
-#endif
-
#include <NCollection_Mat4.hxx>
#include <OpenGl_Context.hxx>
#include <OpenGl_Workspace.hxx>
#include <Graphic3d_TextureEnv.hxx>
+#include <Graphic3d_Mat4d.hxx>
IMPLEMENT_STANDARD_HANDLE(OpenGl_View,MMgt_TShared)
IMPLEMENT_STANDARD_RTTIEXT(OpenGl_View,MMgt_TShared)
myCurrLightSourceState = myStateCounter->Increment();
-#ifdef HAVE_OPENCL
myModificationState = 1; // initial state
-#endif
}
/*----------------------------------------------------------------------*/
if (!anImage.IsNull())
myTextureEnv->Init (theCtx, *anImage.operator->(), theTexture->Type());
-#ifdef HAVE_OPENCL
myModificationState++;
-#endif
}
void OpenGl_View::SetSurfaceDetail (const Visual3d_TypeOfSurfaceDetail theMode)
{
mySurfaceDetail = theMode;
-#ifdef HAVE_OPENCL
myModificationState++;
-#endif
}
// =======================================================================
void OpenGl_View::GetMatrices (TColStd_Array2OfReal& theMatOrient,
TColStd_Array2OfReal& theMatMapping) const
{
- const OpenGl_Matrix* aProj = (const OpenGl_Matrix*) &myCamera->ProjectionMatrix();
- const OpenGl_Matrix* aOrient = (const OpenGl_Matrix*) &myCamera->OrientationMatrix();
+ const Graphic3d_Mat4d& aProj = myCamera->ProjectionMatrix();
+ const Graphic3d_Mat4d& aOrient = myCamera->OrientationMatrix();
- int i, j;
- for (i = 0; i < 4; ++i)
+ for (Standard_Integer aRow = 0; aRow < 4; ++aRow)
{
- for (j = 0; j < 4; ++j)
+ for (Standard_Integer aCol = 0; aCol < 4; ++aCol)
{
- theMatOrient (i, j) = aOrient->mat[j][i];
- theMatMapping (i, j) = aProj-> mat[j][i];
+ theMatOrient (aRow, aCol) = aOrient.GetValue (aRow, aCol);
+ theMatMapping (aRow, aCol) = aProj .GetValue (aRow, aCol);
}
}
}