Correction of Export/Import defines for Win32 platform.
Removed "using namespace std" from header files.
// Author : Alexey PETROV
// Module : VISU
-using namespace std;
-
#include "VISU_MedConvertor.hxx"
#include "VISU_ConvertorUtils.hxx"
using MED::TFloat;
using MED::EBooleen;
+using namespace std;
+
#ifdef _DEBUG_
static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0;
for ( int aDimId = 0; aDimId < aVector.size(); aDimId++ )
aGrilleStructure[aDimId] = aVector[aDimId];
}
-
+
int kMax = aGrilleStructure[2];
int jMax = aGrilleStructure[1];
int iMax = aGrilleStructure[0];
aObj2StructuredId[iii][0] = i;
aObj2StructuredId[iii][1] = j;
aObj2StructuredId[iii][2] = k;
- iii++;
- }
+ iii++;
+ }
}
for(; anEntityIter != theEntityInfo.end(); anEntityIter++){
"; aNbElem = "<<aNbElem<<
"; aNbGauss = "<<aNbGauss<<
endl);
-
+
bool isAverageByGaussPoints = (aNbGauss > 1);
// To calculate min/max per components
for(TInt iElem = 0; iElem < aNbElem; iElem++){
vtkFloatingPointType& anAverageMin = anAverageMinMax.first;
vtkFloatingPointType& anAverageMax = anAverageMinMax.second;
vtkFloatingPointType anAverageValue = 0.0;
- for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
+ for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
const vtkFloatingPointType& aVal = aMValueSlice[iGauss];
- aMin = min(aMin,aVal);
- aMax = max(aMax,aVal);
+ aMin = min(aMin,aVal);
+ aMax = max(aMax,aVal);
if(isAverageByGaussPoints){
anAverageValue += aVal;
}
anAverageValue /= aNbGauss;
anAverageMin = min(anAverageMin,anAverageValue);
anAverageMax = max(anAverageMax,anAverageValue);
- }
+ }
}
}
for(TInt iElem = 0; iElem < aNbElem; iElem++){
typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetGaussValueSliceArr(iElem);
for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
- const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
- vtkFloatingPointType aValue = 0.0;
- for(TInt iComp = 0; iComp < theNbComp2; iComp++){
- vtkFloatingPointType aVal = aMValueSlice[iComp];
- aValue += aVal*aVal;
- }
- aValue = sqrt(aValue);
- aMin = min(aMin,aValue);
- aMax = max(aMax,aValue);
+ const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
+ vtkFloatingPointType aValue = 0.0;
+ for(TInt iComp = 0; iComp < theNbComp2; iComp++){
+ vtkFloatingPointType aVal = aMValueSlice[iComp];
+ aValue += aVal*aVal;
+ }
+ aValue = sqrt(aValue);
+ aMin = min(aMin,aValue);
+ aMax = max(aMax,aValue);
}
if(isAverageByGaussPoints){
typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMCompValueSliceArr = aMMeshValue.GetCompValueSliceArr(iElem);
aKey2Gauss);
InitProfile(theMed,
- aMeshInfo,
- aTimeStampValue,
- theMeshOnEntity,
- aMEntity,
- aGeom2Size,
- theValForTime);
+ aMeshInfo,
+ aTimeStampValue,
+ theMeshOnEntity,
+ aMEntity,
+ aGeom2Size,
+ theValForTime);
LoadProfile(theMed,
theMesh,
class vtkUnstructuredGrid;
class vtkIntArray;
-using namespace std;
#include <set>
#include <vector>
#include <map>
aVolume *= aVol;
}
}
+ if( aNbElem == 0 || fabs(idim) < 1.0 / VTK_LARGE_FLOAT )
+ return 0.0; // to avoid division by zero
aVolume /= aNbElem;
return pow(aVolume, vtkFloatingPointType(1.0/idim));
}
namespace VISU
{
//----------------------------------------------------------------------------
- void
+ void VISU_PIPELINE_EXPORT
Mul(const vtkFloatingPointType A[3],
vtkFloatingPointType b,
vtkFloatingPointType C[3]); // C = A * b
//----------------------------------------------------------------------------
- void
+ void VISU_PIPELINE_EXPORT
Sub(const vtkFloatingPointType A[3],
const vtkFloatingPointType B[3],
vtkFloatingPointType C[3]); // C = A - B
vtkFloatingPointType theSource);
//! Checks whether the scalar range is the same or not
- bool
+ bool VISU_PIPELINE_EXPORT
CheckIsSameRange(vtkFloatingPointType* theTarget,
vtkFloatingPointType* theSource);
//! Customizes vtkMapper::ShallowCopy
- void
+ void VISU_PIPELINE_EXPORT
CopyMapper(vtkMapper* theTarget,
vtkMapper* theSource,
bool theIsCopyInput);
bool theIsCopyInput);
//! Customizes vtkPolyDataMapper::ShallowCopy
- void
+ void VISU_PIPELINE_EXPORT
CopyPolyDataMapper(vtkPolyDataMapper* theTarget,
vtkPolyDataMapper* theSource,
bool theIsCopyInput);
//! Customizes VISU_OpenGLPointSpriteMapper::ShallowCopy
- void
+ void VISU_PIPELINE_EXPORT
CopyPointSpriteDataMapper(VISU_OpenGLPointSpriteMapper* theTarget,
VISU_OpenGLPointSpriteMapper* theSource,
bool theIsCopyInput);
//----------------------------------------------------------------------------
- void
+ void VISU_PIPELINE_EXPORT
ComputeBoundsParam(vtkDataSet* theDataSet,
vtkFloatingPointType theDirection[3],
vtkFloatingPointType theMinPnt[3],
//----------------------------------------------------------------------------
- void
+ void VISU_PIPELINE_EXPORT
DistanceToPosition(vtkDataSet* theDataSet,
vtkFloatingPointType theDirection[3],
vtkFloatingPointType theDist,
//----------------------------------------------------------------------------
- void
+ void VISU_PIPELINE_EXPORT
PositionToDistance(vtkDataSet* theDataSet,
vtkFloatingPointType theDirection[3],
vtkFloatingPointType thePos[3],
{
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView == NULL) return;
- if (!myCutLines) return;
+ if (!(bool)myCutLines) return;
if (myPreviewActor != 0) return;
storeToPrsObject(myCutLines);
}
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
- if (theUpdate && myPreviewCheck->isChecked() && myCutLines) {
+ if (theUpdate && myPreviewCheck->isChecked() && (bool)myCutLines) {
deletePlanes();
createPlanes();
}
myCutLines->SetDisplacement(myPosSpn->value());
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
- if (theUpdate && myPreviewCheck->isChecked() && myCutLines) {
+ if (theUpdate && myPreviewCheck->isChecked() && (bool)myCutLines) {
deletePlanes();
createPlanes();
}
void VisuGUI_CutLinesDlg::onRotation (double theValue)
{
- if (!myCutLines) return;
+ if (!(bool)myCutLines) return;
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
void VisuGUI_CutLinesDlg::onPlanePos (const QString& theValue)
{
- if (!myCutLines) return;
+ if (!(bool)myCutLines) return;
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
void VisuGUI_CutPlanesPane::createPlanes()
{
if (VISU::GetActiveViewWindow<SVTK_ViewWindow>() == NULL) return;
- if (!myCutPlanes) return;
+ if (!(bool)myCutPlanes) return;
if (myPreviewActor != 0) return;
vtkDataSet* aDataSet = myCutPlanes->GetSpecificPL()->GetWarpVectorOutput();
*/
void VisuGUI_CutPlanesPane::DrawTable()
{
- if (!myCutPlanes) return;
+ if (!(bool)myCutPlanes) return;
if (!hasInit) return;
int aNbRows = myPosTable->numRows();
void VisuGUI_CutPlanesPane::onRotation (double theValue)
{
- if (!myCutPlanes) return;
+ if (!(bool)myCutPlanes) return;
if (myPreviewCheck->isChecked()) {
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.);
VisuGUI_ScalarBarBaseDlg::initFromPrsObject(myPrsCopy, theInit);
myCutPane->initFromPrsObject(myPrsCopy);
-
+
if( !theInit )
return;
QDialog* theDlg,
const bool theCreate = true );
+using namespace std;
using namespace VISU;
namespace VISU
#include <qstring.h>
+using namespace std;
+
//=============================================================================
namespace VISU
static int MYDEBUG = 0;
#endif
+using namespace std;
namespace VISU
{
static int MYDEBUG = 0;
#endif
+using namespace std;
+
namespace
{
//----------------------------------------------------------------------------
static int MYDEBUG = 0;
#endif
+using namespace std;
//---------------------------------------------------------------
size_t
static int MYDEBUG = 0;
#endif
-
+using namespace std;
//----------------------------------------------------------------------------
size_t
static int MYDEBUG = 0;
#endif
+using namespace std;
+
static int INCMEMORY = 4+12;
static int MYDEBUG = 0;
#endif
+using namespace std;
//---------------------------------------------------------------
size_t
static int MYDEBUG = 0;
#endif
+using namespace std;
+
static int INCMEMORY = 10;
//----------------------------------------------------------------------------
static int MYDEBUG = 0;
#endif
+using namespace std;
+
extern "C"
VISU_I_EXPORT VISU::VISU_Gen_ptr
GetImpl(CORBA::ORB_ptr theORB,
static int MYDEBUG = 0;
#endif
+using namespace std;
+
//---------------------------------------------------------------
size_t
VISU::IsoSurfaces_i
static int MYDEBUG = 0;
#endif
+using namespace std;
+
static int INCMEMORY = 4;
//----------------------------------------------------------------------------
static int MYDEBUG = 0;
#endif
+using namespace std;
//---------------------------------------------------------------
size_t
static int MYDEBUG = 0;
#endif
+using namespace std;
+
//----------------------------------------------------------------
// PointMap3d Object
//----------------------------------------------------------------
static int MYTIMEDEBUG = 0;
#endif
+using namespace std;
+
namespace VISU
{
//----------------------------------------------------------------------------
static int MYDEBUG = 0;
#endif
+using namespace std;
+
namespace VISU
{
static int MYDEBUG = 0;
#endif
+using namespace std;
+
static int INCMEMORY = 4;
static int MYDEBUG = 0;
#endif
+using namespace std;
//---------------------------------------------------------------
size_t
#else
static int MYDEBUG = 0;
#endif
+
+using namespace std;
//----------------------------------------------------------------
// Table Object
//----------------------------------------------------------------
#include <Standard_ErrorHandler.hxx>
#endif
+using namespace std;
//------------------------------------------------------------------------
namespace VISU
static int MYDEBUG = 0;
#endif
+using namespace std;
+
static int INCMEMORY = 4+12;