VISU::Orientation myOrientation;
- float myDistance;
+ vtkFloatingPointType myDistance;
double myAngle[2];
vtkPlaneSource* myPlaneSource;
void SetOrientation(VISU::Orientation theOrientation) {myOrientation = theOrientation;}
VISU::Orientation GetOrientation() {return myOrientation;}
- void SetDistance(float theDistance) {myDistance = theDistance;}
- float GetDistance() {return myDistance;}
+ void SetDistance(vtkFloatingPointType theDistance)
+ {
+ myDistance = theDistance;
+ }
+ vtkFloatingPointType GetDistance()
+ {
+ return myDistance;
+ }
void ShallowCopy(OrientedPlane* theOrientedPlane){
SetNormal(theOrientedPlane->GetNormal());
myActor->SetMapper(myMapper);
vtkProperty* aProp = vtkProperty::New();
- float anRGB[3];
+ vtkFloatingPointType anRGB[3];
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
myPlanes.clear();
- float anOffset [3];
- myPrs3d->GetOffset(anOffset);
+ CORBA::Float anOffset[3];
+ myPrs3d->GetOffset(anOffset[0],anOffset[1],anOffset[2]);
vtkIdType anId = 0, anEnd = myPrs3d->GetNumberOfClippingPlanes();
for (; anId < anEnd; anId++) {
VISU::TVTKPlane aTVTKPlane(anOrientedPlane);
anOrientedPlane->Delete();
aTVTKPlane->ShallowCopy(aPlane);
- aTVTKPlane->myActor->SetPosition(anOffset);
+ aTVTKPlane->myActor->SetPosition(anOffset[0],anOffset[1],anOffset[2]);
myPlanes.push_back(aTVTKPlane);
}
}
VISU::TVTKPlane aTVTKPlane(aPlane);
myPlanes.push_back(aTVTKPlane);
- float anOffset [3];
- myPrs3d->GetOffset(anOffset);
- aTVTKPlane->myActor->SetPosition(anOffset);
+ CORBA::Float anOffset[3];
+ myPrs3d->GetOffset(anOffset[0],anOffset[1],anOffset[2]);
+ aTVTKPlane->myActor->SetPosition(anOffset[0],anOffset[1],anOffset[2]);
if (PreviewCheckBox->isChecked())
aTVTKPlane->myActor->VisibilityOn();
OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer();
- float aNormal[3];
+ vtkFloatingPointType aNormal[3];
VISU::Orientation anOrientation;
- float aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
+ vtkFloatingPointType aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
{
static double aCoeff = vtkMath::Pi()/180.0;
- float aRot[2] = {getRotation1(), getRotation2()};
+ vtkFloatingPointType aRot[2] = {getRotation1(), getRotation2()};
aPlane->myAngle[0] = aRot[0];
aPlane->myAngle[1] = aRot[1];
- float anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
- float aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
+ vtkFloatingPointType anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
+ vtkFloatingPointType aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
aV[0] = aRot[0] > 0? aV[0]: -aV[0];
aV[1] = aRot[1] > 0? aV[1]: -aV[1];
myPrs3d->SetPlaneParam(aNormal, 1. - getDistance(), aPlane);
vtkDataSet* aDataSet = myPrs3d->GetInput();
- float *aPnt = aDataSet->GetCenter();
+ vtkFloatingPointType *aPnt = aDataSet->GetCenter();
- float* anOrigin = aPlane->GetOrigin();
- float aDel = aDataSet->GetLength()/2.0;
+ vtkFloatingPointType* anOrigin = aPlane->GetOrigin();
+ vtkFloatingPointType aDel = aDataSet->GetLength()/2.0;
- float aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
- {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
- float aParam, aPnt0[3], aPnt1[3], aPnt2[3];
+ vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
+ {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
+ vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3];
- float aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
- aPnt[1] - aDelta[0][1] - aDelta[1][1],
- aPnt[2] - aDelta[0][2] - aDelta[1][2]};
- float aPnt02[3] = {aPnt01[0] + aNormal[0],
- aPnt01[1] + aNormal[1],
- aPnt01[2] + aNormal[2]};
+ vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
+ aPnt[1] - aDelta[0][1] - aDelta[1][1],
+ aPnt[2] - aDelta[0][2] - aDelta[1][2]};
+ vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0],
+ aPnt01[1] + aNormal[1],
+ aPnt01[2] + aNormal[2]};
vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0);
- float aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
- aPnt[1] - aDelta[0][1] + aDelta[1][1],
- aPnt[2] - aDelta[0][2] + aDelta[1][2]};
- float aPnt12[3] = {aPnt11[0] + aNormal[0],
- aPnt11[1] + aNormal[1],
- aPnt11[2] + aNormal[2]};
+ vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
+ aPnt[1] - aDelta[0][1] + aDelta[1][1],
+ aPnt[2] - aDelta[0][2] + aDelta[1][2]};
+ vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0],
+ aPnt11[1] + aNormal[1],
+ aPnt11[2] + aNormal[2]};
vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1);
- float aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
- aPnt[1] + aDelta[0][1] - aDelta[1][1],
- aPnt[2] + aDelta[0][2] - aDelta[1][2]};
- float aPnt22[3] = {aPnt21[0] + aNormal[0],
- aPnt21[1] + aNormal[1],
- aPnt21[2] + aNormal[2]};
+ vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
+ aPnt[1] + aDelta[0][1] - aDelta[1][1],
+ aPnt[2] + aDelta[0][2] - aDelta[1][2]};
+ vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0],
+ aPnt21[1] + aNormal[1],
+ aPnt21[2] + aNormal[2]};
vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2);
vtkPlaneSource* aPlaneSource = aPlane->myPlaneSource;
int i, axId = ButtonGroupIJKAxis->id (ButtonGroupIJKAxis->selected());
VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axId;
gp_Dir dir;
- const vector<float> * values =
+ const vector<vtkFloatingPointType> * values =
result->GetAxisInfo(myPrs3d->GetMeshName(), axis, dir);
if (!values)
return;
// find distance;
int index = SpinBoxIJKIndex->value();
- float distance = 0;
+ vtkFloatingPointType distance = 0;
if (index < values->size())
distance = (*values)[ index ];
}
}
// find rotation angles
- float angle[2];
+ vtkFloatingPointType angle[2];
int rotId[2] = {
(axId == 0) ? 2 : axId - 1,
(axId == 2) ? 0 : axId + 1
};
static double aCoeff = 180.0/vtkMath::Pi();
for (i = 0; i < 2; ++i) {
- float cosin = cos[ rotId[ i ]];
+ vtkFloatingPointType cosin = cos[ rotId[ i ]];
if (maxCos < 0)
cosin = -cosin;
angle[ i ] = asin(cosin) * aCoeff;
int planeIndex = ComboBoxPlanes->currentItem();
OrientedPlane* plane = myPlanes[ planeIndex ].GetPointer();
vtkPlaneSource* planeSource = plane->myPlaneSource;
- float * planeNormal = planeSource->GetNormal();
+ vtkFloatingPointType * planeNormal = planeSource->GetNormal();
gp_Dir normal(planeNormal[0], planeNormal[1], planeNormal[2]);
// find a grid axis most co-directed with plane normal
int i, maxAx = 0, gridAxId = 0;
gp_Dir dir, gridDir;
double maxDot = 0;
- const vector<float> *curValues, *values = 0;
+ const vector<vtkFloatingPointType> *curValues, *values = 0;
VISU::Result_i* result = myPrs3d->GetResult();
for (i = 0; i < 3; ++i) {
VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) i;
if (result) {
VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axisId;
gp_Dir dir;
- const vector<float> * indices = result->GetAxisInfo(myPrs3d->GetMeshName(),
- axis, dir);
+ const vector<vtkFloatingPointType> * indices = result->GetAxisInfo(myPrs3d->GetMeshName(),
+ axis, dir);
if (indices)
maxIndex = indices->size() - 1;
}
//aView->Repaint();
}
}
- float aPos = myCutLines->GetBasePlanePosition();
+ vtkFloatingPointType aPos = myCutLines->GetBasePlanePosition();
myBasePlanePos->setText( QString::number(aPos) );
myBasePlanePos->setEnabled(false);
} else {
void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
if (myPreviewActorGlyphs == 0 ) return;
- const float *aDirLn = myCutLines->GetCutLinesPL()->GetDirLn();
- const float *aBasePnt = myCutLines->GetCutLinesPL()->GetBasePnt();
- float aSecondPnt[3];
- float aBoundCenter[3];
+ const vtkFloatingPointType *aDirLn = myCutLines->GetCutLinesPL()->GetDirLn();
+ const vtkFloatingPointType *aBasePnt = myCutLines->GetCutLinesPL()->GetBasePnt();
+ vtkFloatingPointType aSecondPnt[3];
+ vtkFloatingPointType aBoundCenter[3];
vtkAppendPolyData* aPolyData = myCutLines->GetCutLinesPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
aPlaneMapper->SetInput(aPolyData->GetOutput());
- float bounds[6];
+ vtkFloatingPointType bounds[6];
aPlaneMapper->GetBounds(bounds);
for(int i=0; i<3; i++) aBoundCenter[i] = (bounds[i*2] + bounds[i*2+1])/2.0;
aSecondPnt[i] = -aBasePnt[i] - aDirLn[i];
}
- float max_bound = 0;
+ vtkFloatingPointType max_bound = 0;
max_bound < bounds[1]-bounds[0] ? max_bound = bounds[1] - bounds[0] : max_bound = max_bound;
max_bound < bounds[3]-bounds[2] ? max_bound = bounds[3] - bounds[2] : max_bound = max_bound;
max_bound < bounds[5]-bounds[4] ? max_bound = bounds[5] - bounds[4] : max_bound = max_bound;
// "Title"
myTextDlg->setTitleText(QString(thePrs->GetTitle()));
- float R, G, B;
+ vtkFloatingPointType R, G, B;
thePrs->GetTitleColor(&R, &G, &B);
myTextDlg->myTitleFont->SetData(QColor((int)(R*255.), (int)(G*255.), (int)(B*255.)),
const char* theSuffix,
std::ostringstream& theStr)
{
- float aColor[3];
+ vtkFloatingPointType aColor[3];
vtkRenderer* aRenderer = theViewWindow->getRenderer();
aRenderer->GetBackground(aColor);
Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".R").c_str(),aColor[0]);
Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[1]").c_str(),aViewUp[1]);
Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[2]").c_str(),aViewUp[2]);
- float aParallelScale = aCamera->GetParallelScale();
+ vtkFloatingPointType aParallelScale = aCamera->GetParallelScale();
Storable::DataToStream(theStr,(std::string("myParallelScale") + theSuffix).c_str(),aParallelScale);
double aScaleFactor[3];
const char* theSuffix,
const Storable::TRestoringMap& theMap)
{
- float aColor[3];
+ vtkFloatingPointType aColor[3];
aColor[0] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".R").toDouble();
aColor[1] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".G").toDouble();
aColor[2] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".B").toDouble();
aViewUp[2] = Storable::FindValue(theMap,std::string("myViewUp") + theSuffix + "[2]").toDouble();
aCamera->SetViewUp(aViewUp);
- float aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble();
+ vtkFloatingPointType aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble();
aCamera->SetParallelScale(aParallelScale);
double aScaleFactor[3];
std::string aSegmentationMode;
if(aWidgetCtrl->IsPlanesActive()){
VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
- float anOrigin[3];
+ vtkFloatingPointType anOrigin[3];
aPlanesWidget->GetOrigin(anOrigin);
Storable::DataToStream(theStr,"myCursorOrigin[0]",anOrigin[0]);
Storable::DataToStream(theStr,"myCursorOrigin[1]",anOrigin[1]);
Storable::DataToStream(theStr,"myCursorOrigin[2]",anOrigin[2]);
- float aNormal[3];
+ vtkFloatingPointType aNormal[3];
aPlanesWidget->GetNormal(aNormal);
Storable::DataToStream(theStr,"myCursorNormal[0]",aNormal[0]);
Storable::DataToStream(theStr,"myCursorNormal[1]",aNormal[1]);
Storable::DataToStream(theStr,"myCursorNormal[2]",aNormal[2]);
- float aDepth = aPlanesWidget->Distance();
+ vtkFloatingPointType aDepth = aPlanesWidget->Distance();
Storable::DataToStream(theStr,"myCursorDepth",aDepth);
aSegmentationMode = "Planes";
}else if(aWidgetCtrl->IsSphereActive()){
VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
- float aCenter[3];
+ vtkFloatingPointType aCenter[3];
aSphereWidget->GetCenter(aCenter);
Storable::DataToStream(theStr,"mySphereCursorCenter[0]",aCenter[0]);
Storable::DataToStream(theStr,"mySphereCursorCenter[1]",aCenter[1]);
Storable::DataToStream(theStr,"mySphereCursorCenter[2]",aCenter[2]);
- float aRadius = aSphereWidget->GetRadius();
+ vtkFloatingPointType aRadius = aSphereWidget->GetRadius();
Storable::DataToStream(theStr,"mySphereCursorRaduis",aRadius);
aSegmentationMode = "Sphere";
if(aSegmentationMode == "Planes"){
VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
- float anOrigin[3];
+ vtkFloatingPointType anOrigin[3];
anOrigin[0] = Storable::FindValue(aMap,"myCursorOrigin[0]").toDouble();
anOrigin[1] = Storable::FindValue(aMap,"myCursorOrigin[1]").toDouble();
anOrigin[2] = Storable::FindValue(aMap,"myCursorOrigin[2]").toDouble();
aPlanesWidget->SetOrigin(anOrigin);
- float aNormal[3];
+ vtkFloatingPointType aNormal[3];
aNormal[0] = Storable::FindValue(aMap,"myCursorNormal[0]").toDouble();
aNormal[1] = Storable::FindValue(aMap,"myCursorNormal[1]").toDouble();
aNormal[2] = Storable::FindValue(aMap,"myCursorNormal[2]").toDouble();
aPlanesWidget->SetNormal(aNormal);
- float aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble();
+ vtkFloatingPointType aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble();
aPlanesWidget->SetDistance(aDepth);
aMainWindow->SetPlanesSegementation(true);
}else if(aSegmentationMode == "Sphere"){
VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
- float aCenter[3];
+ vtkFloatingPointType aCenter[3];
aCenter[0] = Storable::FindValue(aMap,"mySphereCursorCenter[0]").toDouble();
aCenter[1] = Storable::FindValue(aMap,"mySphereCursorCenter[1]").toDouble();
aCenter[2] = Storable::FindValue(aMap,"mySphereCursorCenter[2]").toDouble();
aSphereWidget->SetCenter(aCenter);
- float aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble();
+ vtkFloatingPointType aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble();
aSphereWidget->SetRadius(aRadius);
aMainWindow->SetSphereSegementation(true);
ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).latin1() );
param = vtkParam + "Opacity";
ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).latin1() );
- float r, g, b;
+ vtkFloatingPointType r, g, b;
vActor->GetColor(r, g, b);
QString colorStr = QString::number( r ); colorStr += gDigitsSep;
colorStr += QString::number( g ); colorStr += gDigitsSep;
param = vtkParam + "ClippingPlane_";
for ( int p = 0, nPlanes = vPrs->GetNumberOfClippingPlanes(); p < nPlanes; p++ ) {
vtkPlane* plane = vPrs->GetClippingPlane( p );
- float normal[3], origin[3];
+ vtkFloatingPointType normal[3], origin[3];
plane->GetNormal( normal );
plane->GetOrigin( origin );
std::string planeValue = QString::number( normal[0] ).latin1(); planeValue += gDigitsSep;
else if ( paramName.find( "ClippingPlane" ) != std::string::npos ) {
QStringList vals = QStringList::split( gDigitsSep, val );
if ( vals.count() == 6 && vActor->GetPrs3d() ) {
- float normal[3], origin[3];
+ vtkFloatingPointType normal[3], origin[3];
for (int x = 0; x < 3; x++ ) {
normal[x] = vals[x].toFloat();
origin[x] = vals[x+3].toFloat();
TopLayout->setSpacing(6);
TopLayout->setMargin(11);
- QHBox* aOffsetsPane = new QHBox (this);
- aOffsetsPane->setSpacing(6);
+ QHBox* anOffsetsPane = new QHBox (this);
+ anOffsetsPane->setSpacing(6);
- new QLabel ("dX:", aOffsetsPane);
- myDxEdt = new QtxDblSpinBox (aOffsetsPane, "myDxEdt");
+ new QLabel ("dX:", anOffsetsPane);
+ myDxEdt = new QtxDblSpinBox (anOffsetsPane, "myDxEdt");
myDxEdt->setRange(-MAXVAL, MAXVAL);
- new QLabel("dY:", aOffsetsPane);
- myDyEdt = new QtxDblSpinBox (aOffsetsPane, "myDyEdt");
+ new QLabel("dY:", anOffsetsPane);
+ myDyEdt = new QtxDblSpinBox (anOffsetsPane, "myDyEdt");
myDyEdt->setRange(-MAXVAL, MAXVAL);
- new QLabel("dZ:", aOffsetsPane);
- myDzEdt = new QtxDblSpinBox (aOffsetsPane, "myDzEdt");
+ new QLabel("dZ:", anOffsetsPane);
+ myDzEdt = new QtxDblSpinBox (anOffsetsPane, "myDzEdt");
myDzEdt->setRange(-MAXVAL, MAXVAL);
- QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), aOffsetsPane);
+ QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), anOffsetsPane);
connect(aResetBtn, SIGNAL(clicked()), this, SLOT(onReset()));
- TopLayout->addWidget(aOffsetsPane);
+ TopLayout->addWidget(anOffsetsPane);
if (!VISU::GetCStudy(VISU::GetAppStudy(theModule))->GetProperties()->IsLocked()) {
mySaveChk = new QCheckBox ("Save to presentation", this);
void VisuGUI_OffsetDlg::addPresentation (VISU::Prs3d_i* thePrs)
{
myPrsList.append(thePrs);
- OffsetStruct aOffs;
- thePrs->GetOffset(aOffs.myOffset);
- myOldOffsets.append(aOffs);
+ CORBA::Float anOffset[3];
+ thePrs->GetOffset(anOffset[0],anOffset[1],anOffset[2]);
+ OffsetStruct anOffs(anOffset[0],anOffset[1],anOffset[2]);
+ myOldOffsets.append(anOffs);
if (myPrsList.count() == 1) {
- setOffset(aOffs.myOffset);
+ setOffset(anOffs.myOffset);
} else if (myPrsList.count() == 2) {
- float aOffset[3];
- aOffset[0] = aOffset[1] = aOffset[2] = 0;
- setOffset(aOffset);
+ OffsetStruct anOffs;
+ setOffset(anOffs.myOffset);
}
}
-void VisuGUI_OffsetDlg::setOffset (const float* theOffset)
+void VisuGUI_OffsetDlg::setOffset (const vtkFloatingPointType* theOffset)
{
myDxEdt->setValue(theOffset[0]);
myDyEdt->setValue(theOffset[1]);
myDzEdt->setValue(theOffset[2]);
}
-void VisuGUI_OffsetDlg::getOffset (float* theOffset) const
+void VisuGUI_OffsetDlg::getOffset (vtkFloatingPointType* theOffset) const
{
theOffset[0] = myDxEdt->value();
theOffset[1] = myDyEdt->value();
return false;
}
-void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, float* theOffset)
+void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset)
{
if (myPrsList.count() == 0) return;
- if (isToSave()) thePrs->SetOffset(theOffset);
+ if (isToSave()) thePrs->SetOffset(theOffset[0],theOffset[1],theOffset[2]);
ViewManagerList aViewManagerList;
SalomeApp_Application* anApp = myModule->getApp();
void VisuGUI_OffsetDlg::accept()
{
- float aOffset[3];
- getOffset(aOffset);
+ vtkFloatingPointType anOffset[3];
+ getOffset(anOffset);
for (int i = 0; i < myPrsList.count(); i++) {
- updateOffset(myPrsList.at(i), aOffset);
+ updateOffset(myPrsList.at(i), anOffset);
}
QDialog::accept();
}
void VisuGUI_OffsetDlg::onApply()
{
- float aOffset[3];
- getOffset(aOffset);
+ vtkFloatingPointType anOffset[3];
+ getOffset(anOffset);
for (int i = 0; i < myPrsList.count(); i++) {
- updateOffset(myPrsList.at(i), aOffset);
+ updateOffset(myPrsList.at(i), anOffset);
}
}
#ifndef DIALOGBOX_OFFSET_H
#define DIALOGBOX_OFFSET_H
+#include "VTKViewer.h"
#include "VISU_Prs3d_i.hh"
// QT Includes
class QtxDblSpinBox;
class VisuGUI;
-struct OffsetStruct {
- float myOffset[3];
+struct OffsetStruct
+{
+ vtkFloatingPointType myOffset[3];
+
+ OffsetStruct()
+ {
+ myOffset[0] = myOffset[1] = myOffset[2] = 0;
+ }
+
+ OffsetStruct(vtkFloatingPointType theX,
+ vtkFloatingPointType theY,
+ vtkFloatingPointType theZ)
+ {
+ myOffset[0] = theX;
+ myOffset[1] = theY;
+ myOffset[2] = theZ;
+ }
};
class VisuGUI_OffsetDlg: public QDialog
void addPresentation (VISU::Prs3d_i* thePrs);
int getPrsCount() const { return myPrsList.count(); }
- void setOffset (const float* theOffset);
- void getOffset (float* theOffset) const;
+ void setOffset (const vtkFloatingPointType* theOffset);
+ void getOffset (vtkFloatingPointType* theOffset) const;
bool isToSave() const;
public slots:
void onHelp();
private:
- void updateOffset (VISU::Prs3d_i* thePrs, float* theOffset);
+ void updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset);
VisuGUI * myModule;
//=======================================================================
class TPlane : public SALOME_Actor
{
- float mySize;
+ vtkFloatingPointType mySize;
vtkDataSetMapper* myMapper;
vtkPlaneSource* myPlaneSource;
public:
// constructor
- TPlane(float planeSize): mySize(planeSize)
+ TPlane(vtkFloatingPointType planeSize): mySize(planeSize)
{
Init();
}
// set plane parameters
- void Set(float origin[3], float normal[3])
+ void Set(vtkFloatingPointType origin[3], vtkFloatingPointType normal[3])
{
- float point2[3], point1[3];
+ vtkFloatingPointType point2[3], point1[3];
vtkMath::Perpendiculars(normal, point1, point2, 0.);
for (int i = 0; i < 3; ++i) {
point1[ i ] = point1[ i ] * mySize + origin[ i ];
void VisuGUI_Plot3DPane::onPositionSpn()
{
if (myPrs && !RelativeChkB->isChecked()) {
- float minPos, maxPos;
+ vtkFloatingPointType minPos, maxPos;
storePrsParams();
myPrs->GetPlot3DPL()->GetMinMaxPosition(minPos, maxPos);
restorePrsParams();
//=======================================================================
void VisuGUI_Plot3DPane::onRelativePos(bool isRelativePos)
{
- float minPos = 0., maxPos = 1., pos = PositionSpn->value();
+ vtkFloatingPointType minPos = 0., maxPos = 1., pos = PositionSpn->value();
if (myPrs) {
storePrsParams();
myPrs->GetPlot3DPL()->GetMinMaxPosition(minPos, maxPos);
}
// set plane parameters corresponding to control values
storePrsParams();
- float normal[3], origin[3];
+ vtkFloatingPointType normal[3], origin[3];
myPrs->GetPlot3DPL()->GetBasePlane(origin, normal, true);
planePreview->Set(origin, normal);
restorePrsParams();
default:
setLogarithmic(false);
}
- float aRange[2];
+ vtkFloatingPointType aRange[2];
thePrs->GetScalarMapPL()->GetSourceRange(aRange);
Rmin = aRange[0]; Rmax = aRange[1];
setRange( thePrs->GetMin(), thePrs->GetMax(),
// "Title"
myTextDlg->setTitleText(QString(thePrs->GetTitle()));
- float R, G, B;
+ vtkFloatingPointType R, G, B;
thePrs->GetTitleColor(&R, &G, &B);
myTextDlg->myTitleFont->SetData(QColor((int)(R*255.), (int)(G*255.), (int)(B*255.)),
isTitleBold,isTitleItalic,isTitleShadow);
vtkTextProperty* aTitleProp = aScalarBarActor->GetTitleTextProperty();
aTitleProp->SetFontFamily(aTitleFontFamily);
- aTitleProp->SetColor(float(aTitleColor.red())/255.,
- float(aTitleColor.green())/255.,
- float(aTitleColor.blue())/255.);
+ aTitleProp->SetColor(vtkFloatingPointType(aTitleColor.red())/255.,
+ vtkFloatingPointType(aTitleColor.green())/255.,
+ vtkFloatingPointType(aTitleColor.blue())/255.);
(isTitleBold)? aTitleProp->BoldOn() : aTitleProp->BoldOff();
(isTitleItalic)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
(isTitleShadow)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
isLabelBold, isLabelItalic, isLabelShadow);
vtkTextProperty* aLabelProp = aScalarBarActor->GetLabelTextProperty();
aLabelProp->SetFontFamily(aLabelFontFamily);
- aLabelProp->SetColor(float(aLabelColor.red())/255.,
- float(aLabelColor.green())/255.,
- float(aLabelColor.blue())/255.);
+ aLabelProp->SetColor(vtkFloatingPointType(aLabelColor.red())/255.,
+ vtkFloatingPointType(aLabelColor.green())/255.,
+ vtkFloatingPointType(aLabelColor.blue())/255.);
(isLabelBold)? aLabelProp->BoldOn() : aLabelProp->BoldOff();
(isLabelItalic)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
(isLabelShadow)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
{
if ( myScalarMap ) {
if ( RBFrange->isChecked() ) {
- float aRange[2];
+ vtkFloatingPointType aRange[2];
myScalarMap->SetScalarMode(theMode);
myScalarMap->GetScalarMapPL()->GetSourceRange(aRange);
MinEdit->setText( QString::number( aRange[0] ) );
void VisuGUI_ScalarMapOnDeformedShapeDlg::UpdateScalarField(){
myPrs->SetScale(getFactor());
- float aRange[2];
+ vtkFloatingPointType aRange[2];
myPrs->GetScalarMapOnDeformedShapePL()->Build();
myPrs->GetScalarMapOnDeformedShapePL()->Update();
myPrs->GetScalarMapOnDeformedShapePL()->GetSourceRange(aRange);
template<class TData> QString getValue(TData* theData, int theId){
if (vtkDataArray *aScalar = theData->GetScalars()){
- float aVal = aScalar->GetTuple1(theId);
+ vtkFloatingPointType aVal = aScalar->GetTuple1(theId);
return QString::number(aVal);
} else {
return QString("No data");
template<class TData> QString getVector(TData* theData, int theId){
if (vtkDataArray *aVector = theData->GetVectors()) {
- float *aVal = aVector->GetTuple3(theId);
+ vtkFloatingPointType *aVal = aVector->GetTuple3(theId);
return QString("%1; %2; %3").arg(aVal[0]).arg(aVal[1]).arg(aVal[2]);
} else {
return QString("No data");
VISU_Actor* anVISUActor =
VISU::FindActor(aViewWindow, aSObject->GetID().c_str());
if (anVISUActor) {
- float aCoord[6];
+ vtkFloatingPointType aCoord[6];
anVISUActor->GetBounds(aCoord);
myXPosLbl->setText(QString::number( aCoord[0] ));
myYPosLbl->setText(QString::number( aCoord[2] ));
myDZLbl->setText(QString::number( ABS(aCoord[5]-aCoord[4]) ));
TColStd_IndexedMapOfInteger aMapIndex;
- typedef map<int,float*> PointsMap;
+ typedef map<int,vtkFloatingPointType*> PointsMap;
PointsMap aPointsMap;
aSelector->GetIndex(anIO, aMapIndex);
switch (aType) {
case 0:
{
- float* aCoord = anVISUActor->GetNodeCoord(anID);
+ vtkFloatingPointType* aCoord = anVISUActor->GetNodeCoord(anID);
int aVTKID = anVISUActor->GetNodeVTKID(anID);
myXValLbl->setText( QString::number( aCoord[0] ) );
myYValLbl->setText( QString::number( aCoord[1] ) );
myCellScalarValLbl->setText(getValue(aCellData, aVTKID));
myCellVectorValLbl->setText(getVector(aCellData, aVTKID));
- float* aCoord;
+ vtkFloatingPointType* aCoord;
vtkIdList *aPointList = aCell->GetPointIds();
for (int i = 0; i < aNbOfPoints; i++) {
myListPoints->verticalHeader()->setLabel(i, QString::number( i ));
int id = It->first;
myListPoints->setText(i, 0, QString::number( id ));
- float* aCoord = It->second;
+ vtkFloatingPointType* aCoord = It->second;
myListPoints->setText(i, 1, QString::number( aCoord[0] ));
myListPoints->setText(i, 2, QString::number( aCoord[1] ));
myListPoints->setText(i, 3, QString::number( aCoord[2] ));
FieldData& aData = myAnimator->getFieldData(myFieldLst->currentItem());
if (aData.myPrs.empty())
myAnimator->generatePresentations(myFieldLst->currentItem());
- float aBounds[6];
+ vtkFloatingPointType aBounds[6];
aData.myPrs[0]->GetBounds(aBounds);
- float aDist = 0;
+ vtkFloatingPointType aDist = 0;
int aAxis = getAxis();
switch (aAxis) {
case XAxis:
aDist = fabs(aBounds[5] - aBounds[4]);
}
- float dx = fabs(aBounds[1] - aBounds[0]);
- float dy = fabs(aBounds[3] - aBounds[2]);
- float dz = fabs(aBounds[5] - aBounds[4]);
- float max = (dx > dy) ? dx : dy;
+ vtkFloatingPointType dx = fabs(aBounds[1] - aBounds[0]);
+ vtkFloatingPointType dy = fabs(aBounds[3] - aBounds[2]);
+ vtkFloatingPointType dz = fabs(aBounds[5] - aBounds[4]);
+ vtkFloatingPointType max = (dx > dy) ? dx : dy;
max = (dz > max) ? dz : max;
max /= 100.0;
anActor->SetPosition(aOffs.myOffset);
if (mySaveChk)
if (mySaveChk->isChecked())
- aPrs->SetOffset(aOffs.myOffset);
+ aPrs->SetOffset(aOffs.myOffset[0],aOffs.myOffset[1],aOffs.myOffset[2]);
}
} else {
- float aDist = 0;
- float aShift = 0;
- float aPrevDist = 0;
- float aPrevShift = 0;
+ vtkFloatingPointType aDist = 0;
+ vtkFloatingPointType aShift = 0;
+ vtkFloatingPointType aPrevDist = 0;
+ vtkFloatingPointType aPrevShift = 0;
int i;
QMap<VISU::Prs3d_i*, int>::Iterator it;
for (it = myPrsMap.begin(), i = 0; it != myPrsMap.end(); ++it, i++) {
if (VISU_Actor* aActor = VISU::GetActor(aPrs, myViewWindow)) {
int aAxis = getAxis();
- float aZeroOffset[3];
+ vtkFloatingPointType aZeroOffset[3];
aZeroOffset[0] = aZeroOffset[1] = aZeroOffset[2] = 0;
aActor->SetPosition(aZeroOffset);
aActor->GetMapper()->Update();
- float aBounds[6];
+ vtkFloatingPointType aBounds[6];
aActor->GetBounds(aBounds);
switch (aAxis) {
case XAxis:
case ZAxis:
aDist = fabs(aBounds[5] - aBounds[4]);
}
- float aOffset[3];
+ vtkFloatingPointType aOffset[3];
aOffset[0] = aOffset[1] = aOffset[2] = 0;
aOffset[aAxis] =
(aBounds[2*aAxis+1] < aBounds[2*aAxis]) ? -aBounds[2*aAxis+1] : -aBounds[2*aAxis];
if (i > 0) {
- float aCCDist = (aDist + aPrevDist) / 2.0;
+ vtkFloatingPointType aCCDist = (aDist + aPrevDist) / 2.0;
- float dx = fabs(aBounds[1] - aBounds[0]);
- float dy = fabs(aBounds[3] - aBounds[2]);
- float dz = fabs(aBounds[5] - aBounds[4]);
- float max = (dx > dy) ? dx : dy;
+ vtkFloatingPointType dx = fabs(aBounds[1] - aBounds[0]);
+ vtkFloatingPointType dy = fabs(aBounds[3] - aBounds[2]);
+ vtkFloatingPointType dz = fabs(aBounds[5] - aBounds[4]);
+ vtkFloatingPointType max = (dx > dy) ? dx : dy;
max = (dz > max) ? dz : max;
max /= 100.0;
aActor->SetPosition(aOffset);
if (mySaveChk)
if (mySaveChk->isChecked())
- aPrs->SetOffset(aOffset);
+ aPrs->SetOffset(aOffset[0],aOffset[1],aOffset[2]);
aPrevDist = aDist;
aPrevShift = aShift;
#ifndef VISUGUI_TIMEANIMATION_H
#define VISUGUI_TIMEANIMATION_H
+#include "VTKViewer.h"
#include "QtxDblSpinBox.h"
-
#include "SALOMEDSClient_Study.hxx"
#include <qdialog.h>
private:
struct Offset {
- float myOffset[3];
+ vtkFloatingPointType myOffset[3];
};
QApplication::setOverrideCursor( Qt::waitCursor );
try {
- if (aActor = thePrs->CreateActor())
+ if ((aActor = thePrs->CreateActor()))
theViewWindow->AddActor(aActor);
} catch(std::exception& exc) {
SUIT_MessageBox::warn1
QApplication::restoreOverrideCursor();
}
- static bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow,
- float allBounds[6],
- const char* theActorClassName = "VISU_Actor")
+ static
+ bool
+ ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow,
+ vtkFloatingPointType allBounds[6],
+ const char* theActorClassName = "VISU_Actor")
{
vtkRenderer *aRen = theViewWindow->getRenderer();
vtkActorCollection *anActColl = aRen->GetActors();
vtkProp *prop;
- float *bounds;
- int somethingVisible = false;
+ vtkFloatingPointType *bounds;
+ int somethingVisible = false;
allBounds[0] = allBounds[2] = allBounds[4] = VTK_LARGE_FLOAT;
allBounds[1] = allBounds[3] = allBounds[5] = -VTK_LARGE_FLOAT;
void SetFitAll(SVTK_ViewWindow* theViewWindow)
{
- static float PRECISION = 0.000001;
- static float DEVIATION = 600;
- float XYZ_Bnd[6];
+ static vtkFloatingPointType PRECISION = 0.000001;
+ static vtkFloatingPointType DEVIATION = 600;
+ vtkFloatingPointType XYZ_Bnd[6];
if (!ComputeVisiblePropBounds(theViewWindow, XYZ_Bnd)) return;
- float absX = XYZ_Bnd[1] - XYZ_Bnd[0];
- float absY = XYZ_Bnd[3] - XYZ_Bnd[2];
- float absZ = XYZ_Bnd[5] - XYZ_Bnd[4];
+ vtkFloatingPointType absX = XYZ_Bnd[1] - XYZ_Bnd[0];
+ vtkFloatingPointType absY = XYZ_Bnd[3] - XYZ_Bnd[2];
+ vtkFloatingPointType absZ = XYZ_Bnd[5] - XYZ_Bnd[4];
enum CameraOrient {e3D, eFront, eLeft, eTop};
CameraOrient aCameraOrient = e3D;
if (absZ <= PRECISION) aCameraOrient = eTop;
else {
// all the three dimensions exceeds precision
- float dev_abs_XY = absX / absY;
- float dev_abs_YZ = absY / absZ;
- float dev_abs_XZ = absX / absZ;
+ vtkFloatingPointType dev_abs_XY = absX / absY;
+ vtkFloatingPointType dev_abs_YZ = absY / absZ;
+ vtkFloatingPointType dev_abs_XZ = absX / absZ;
if (dev_abs_XY >= DEVIATION || 1./dev_abs_YZ >= DEVIATION)
aCameraOrient = eLeft;
else {
if(aPlot){
QList<Plot2d_Curve> clist;
aPlot->getCurves( clist );
- SPlot2d_Curve* plotCurve = 0;
- SPlot2d_Curve* tmpCurve;
for (int i = 0; i < clist.count(); i++) {
- tmpCurve = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
- if (tmpCurve &&
- tmpCurve->hasIO() &&
- (tmpCurve->getIO()->getEntry() == anEntry))
- aPlot->eraseCurve(clist.at(i));
+ if(SPlot2d_Curve* plotCurve = dynamic_cast<SPlot2d_Curve*>(clist.at(i)))
+ if(plotCurve->hasIO() && (plotCurve->getIO()->getEntry() == anEntry))
+ aPlot->eraseCurve(clist.at(i));
}
}
}
SetItalicTitle(anOrigin->IsItalicTitle());
SetShadowTitle(anOrigin->IsShadowTitle());
SetTitFontType(anOrigin->GetTitFontType());
- float r,g,b;
+ vtkFloatingPointType r,g,b;
anOrigin->GetTitleColor(&r,&g,&b);
SetTitleColor(r,g,b);
void
VISU::ColoredPrs3d_i
-::GetTitleColor(float* theR, float* theG, float* theB)
+::GetTitleColor(vtkFloatingPointType* theR,
+ vtkFloatingPointType* theG,
+ vtkFloatingPointType* theB)
{
*theR = myTitleColor[0];
*theG = myTitleColor[1];
void
VISU::ColoredPrs3d_i
-::SetTitleColor(float theR, float theG, float theB)
+::SetTitleColor(vtkFloatingPointType theR,
+ vtkFloatingPointType theG,
+ vtkFloatingPointType theB)
{
myTitleColor[0] = theR;
myTitleColor[1] = theG;
void
VISU::ColoredPrs3d_i
-::GetLabelColor(float* theR, float* theG, float* theB)
+::GetLabelColor(vtkFloatingPointType* theR,
+ vtkFloatingPointType* theG,
+ vtkFloatingPointType* theB)
{
*theR = myLabelColor[0];
*theG = myLabelColor[1];
void
VISU::ColoredPrs3d_i
-::SetLabelColor(float theR, float theG, float theB)
+::SetLabelColor(vtkFloatingPointType theR,
+ vtkFloatingPointType theG,
+ vtkFloatingPointType theB)
{
myLabelColor[0] = theR;
myLabelColor[1] = theG;
// Scalar Bar origin
QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" );
- float aXorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.01 : 0.2;
+ vtkFloatingPointType aXorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.01 : 0.2;
aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
myPosition[0] = aXorigin;
- float aYorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.1 : 0.012;
+ vtkFloatingPointType aYorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.1 : 0.012;
aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
myPosition[1] = aYorigin;
VISU::ScalarMap::Orientation myOrientation;
std::string myTitle;
int myNumberOfLabels;
- float myPosition[2], myWidth, myHeight;
+ vtkFloatingPointType myPosition[2], myWidth, myHeight;
public:
//----------------------------------------------------------------------------
virtual
void
- GetTitleColor(float* theR, float* theG, float* theB);
+ GetTitleColor(vtkFloatingPointType* theR,
+ vtkFloatingPointType* theG,
+ vtkFloatingPointType* theB);
virtual
void
- SetTitleColor(float theR, float theG, float theB);
+ SetTitleColor(vtkFloatingPointType theR,
+ vtkFloatingPointType theG,
+ vtkFloatingPointType theB);
virtual
bool
virtual
void
- GetLabelColor(float* theR, float* theG, float* theB);
+ GetLabelColor(vtkFloatingPointType* theR,
+ vtkFloatingPointType* theG,
+ vtkFloatingPointType* theB);
virtual
void
- SetLabelColor(float theR, float theG, float theB);
+ SetLabelColor(vtkFloatingPointType theR,
+ vtkFloatingPointType theG,
+ vtkFloatingPointType theB);
//----------------------------------------------------------------------------
protected:
bool myIsItalicTitle;
bool myIsShadowTitle;
int myTitFontType;
- float myTitleColor[3];
+ vtkFloatingPointType myTitleColor[3];
bool myIsBoldLabel;
bool myIsItalicLabel;
bool myIsShadowLabel;
int myLblFontType;
- float myLabelColor[3];
+ vtkFloatingPointType myLabelColor[3];
VISU_ScalarMapPL* myScalarMapPL;
bool myIsFixedRange;
if(theFamily->myIsDone)
return 0;
- const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
SALOME_MED::FAMILY_var aMedFamily = theFamily->myFamily;
CORBA::Boolean anIsOnAllElements = aMedFamily->isOnAllElements();
if(!anIsOnAllElements){
using namespace VISU;
using namespace std;
-static float EPS_machine = 1.0E-7;
+static vtkFloatingPointType EPS_machine = 1.0E-7;
#ifdef _DEBUG_
static int MYDEBUG = 0;
anAttr = aStudyBuilder->FindOrCreateAttribute(theSObject, "AttributeTableOfReal");
SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
- typedef set<float> TXCont;
- typedef map<float,float> TXYMap;
+ typedef set<vtkFloatingPointType> TXCont;
+ typedef map<vtkFloatingPointType,vtkFloatingPointType> TXYMap;
typedef map<int,TXYMap> TXYMapCont;
typedef map<long,long> TLineIdCont;
TXCont aXCont;
TXYMapCont aXYMapCont;
TLineIdCont aLineIdCont; // Define internal numeration of lines
- const float *aDirLn = myCutLinesPL->GetDirLn();
- const float *aBasePnt = myCutLinesPL->GetBasePnt();
- const float *aBoundPrjLn = myCutLinesPL->GetBoundPrjLn();
+ const vtkFloatingPointType *aDirLn = myCutLinesPL->GetDirLn();
+ const vtkFloatingPointType *aBasePnt = myCutLinesPL->GetBasePnt();
+ const vtkFloatingPointType *aBoundPrjLn = myCutLinesPL->GetBoundPrjLn();
for(int iLine = 0, jLine = 0; iLine < iLineEnd; iLine++){
vtkDataSet *aDataSet = myCutLinesPL->GetAppendPolyData()->GetInput(iLine);
aDataSet->Update();
if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLine = "<<iLine<<"; aNbPoints = "<<aNbPoints);
aLineIdCont[iLine] = jLine++;
TXYMap& aXYMap = aXYMapCont[iLine];
- float aPnt[3], aVect[3], aDist;
+ vtkFloatingPointType aPnt[3], aVect[3], aDist;
for(int i = 0; i < aNbPoints; i++){
aDataSet->GetPoint(i,aPnt);
Sub(aPnt,aBasePnt,aVect);
TXYMap aNewXYMap;
TXYMap& aXYMap = aXYMapCont[iLine];
TXYMap::const_iterator aXYMapIter = aXYMap.begin();
- std::list<float> XKeys;
+ std::list<vtkFloatingPointType> XKeys;
for (;aXYMapIter != aXYMap.end() ; aXYMapIter++) XKeys.push_back(aXYMapIter->first);
XKeys.sort();
if (XKeys.size() > 1) {
- float a_first_indx = XKeys.front();
- float a_last_indx = XKeys.back();
+ vtkFloatingPointType a_first_indx = XKeys.front();
+ vtkFloatingPointType a_last_indx = XKeys.back();
if (a_first_indx > a_last_indx){
XKeys.reverse();
- float tmp = a_first_indx;
+ vtkFloatingPointType tmp = a_first_indx;
a_first_indx = a_last_indx;
a_last_indx = tmp;
}
- std::list<float>::const_iterator aIter = XKeys.begin();
+ std::list<vtkFloatingPointType>::const_iterator aIter = XKeys.begin();
for (int k=0;k<XKeys.size() and aIter != XKeys.end();k++,aIter++){
// Warning: value '1.0' come from workaround:
// see also aDist = vtkMath::Dot(aVect,aDirLn) / aBoundPrjLn[2];
aNewXYMap[aXYMapIter[0]->first] = aXYMapIter[0]->second;
aXCont.insert(aXYMapIter[0]->first);
for(; aXYMapIter[1] != aXYMap.end(); aXYMapIter[0]++, aXYMapIter[1]++){
- float aY[3] = {aXYMapIter[0]->second, aXYMapIter[1]->second, 0.0};
+ vtkFloatingPointType aY[3] = {aXYMapIter[0]->second, aXYMapIter[1]->second, 0.0};
aY[2] = (aY[0] + aY[1])/2.0;
- float aX[3] = {aXYMapIter[0]->first, aXYMapIter[1]->first, 0.0};
+ vtkFloatingPointType aX[3] = {aXYMapIter[0]->first, aXYMapIter[1]->first, 0.0};
aX[2] = (aX[0] + aX[1])/2.0;
aNewXYMap[aX[2]] = aY[2];
aXCont.insert(aX[2]);
aTableOfReal->SetNbColumns(iEnd);
TXCont::const_iterator aXContIter = aXCont.begin();
for(long i = 0; aXContIter != aXCont.end(); aXContIter++, i++){
- float aDist = *aXContIter;
+ vtkFloatingPointType aDist = *aXContIter;
aTableOfReal->PutValue(aDist,1,i+1);
aString.sprintf("%d",i);
aTableOfReal->SetColumnTitle(i+1,aString.latin1());
TXYMap::const_iterator aXYMapIter = aXYMap.find(aDist);
// Can we find some value that belong to the line and have the same X coordinate?
if(aXYMapIter == aXYMap.end()) continue;
- float aVal = aXYMapIter->second;
+ vtkFloatingPointType aVal = aXYMapIter->second;
aTableOfReal->PutValue(aVal,iLineId+2,i+1);
}
}
int aBicolor = aResourceMgr->integerValue( "VISU", "scalar_bar_bicolor", GetBiColor() );
SetBiColor( aBicolor == 0 );
- float aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() );
+ vtkFloatingPointType aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() );
SetSpacing( aSpacing );
- float aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() );
+ vtkFloatingPointType aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() );
SetScaleFactor( aScaleFactor );
int aPrimitiveType = aResourceMgr->integerValue( "VISU", "point_sprite_primitive_type", GetPrimitiveType() );
SetPrimitiveType( aPrimitiveType );
- float aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() );
+ vtkFloatingPointType aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() );
SetClamp( aClamp );
int aMinSize = aResourceMgr->integerValue( "VISU", "point_sprite_min_size", ( int )( GetMinSize() * 100.0 ) );
int aMagnification = aResourceMgr->integerValue( "VISU", "point_sprite_magnification", ( int )( GetMagnification() * 100.0 ) );
SetMagnification( aMagnification / 100.0 );
- float anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() );
+ vtkFloatingPointType anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() );
SetMagnificationIncrement( anIncrement );
bool isColored = aResourceMgr->booleanValue( "VISU", "point_sprite_results", GetIsColored() );
QColor aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", GetColor() );
SetColor( aColor );
- float anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() );
+ vtkFloatingPointType anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() );
SetAlphaThreshold( anAlphaThreshold );
int aResolution = aResourceMgr->integerValue( "VISU", "geom_sphere_resolution", GetResolution() );
void
VISU::GaussPoints_i
-::SetScaleFactor( float theScaleFactor )
+::SetScaleFactor( vtkFloatingPointType theScaleFactor )
{
myGaussPointsPL->SetScale( theScaleFactor );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetScaleFactor()
{
void
VISU::GaussPoints_i
-::SetAlphaThreshold( float theAlphaThreshold )
+::SetAlphaThreshold( vtkFloatingPointType theAlphaThreshold )
{
myGaussPointsPL->SetAlphaThreshold( theAlphaThreshold );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetAlphaThreshold()
{
return myGaussPointsPL->GetPrimitiveType();
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetMaximumSupportedSize()
{
void
VISU::GaussPoints_i
-::SetClamp(float theClamp)
+::SetClamp(vtkFloatingPointType theClamp)
{
myGaussPointsPL->SetClamp( theClamp );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetClamp()
{
void
VISU::GaussPoints_i
-::SetGeomSize( float theGeomSize )
+::SetGeomSize( vtkFloatingPointType theGeomSize )
{
myGaussPointsPL->SetSize( theGeomSize );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetGeomSize()
{
void
VISU::GaussPoints_i
-::SetMinSize( float theMinSize )
+::SetMinSize( vtkFloatingPointType theMinSize )
{
myGaussPointsPL->SetMinSize( theMinSize );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetMinSize()
{
void
VISU::GaussPoints_i
-::SetMaxSize( float theMaxSize )
+::SetMaxSize( vtkFloatingPointType theMaxSize )
{
myGaussPointsPL->SetMaxSize( theMaxSize );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetMaxSize()
{
void
VISU::GaussPoints_i
-::SetMagnification( float theMagnification )
+::SetMagnification( vtkFloatingPointType theMagnification )
{
myGaussPointsPL->SetMagnification( theMagnification );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetMagnification()
{
void
VISU::GaussPoints_i
-::SetMagnificationIncrement( float theIncrement )
+::SetMagnificationIncrement( vtkFloatingPointType theIncrement )
{
myGaussPointsPL->SetMagnificationIncrement( theIncrement );
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetMagnificationIncrement()
{
vtkTextProperty* aTitleProp = theScalarBar->GetTitleTextProperty();
aTitleProp->SetFontFamily(myTitFontType);
- aTitleProp->SetColor(myTitleColor);
+ aTitleProp->SetColor(myTitleColor[0],myTitleColor[1],myTitleColor[2]);
(myIsBoldTitle)? aTitleProp->BoldOn() : aTitleProp->BoldOff();
(myIsItalicTitle)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
(myIsShadowTitle)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
vtkTextProperty* aLabelProp = theScalarBar->GetLabelTextProperty();
aLabelProp->SetFontFamily(myLblFontType);
- aLabelProp->SetColor(myLabelColor);
+ aLabelProp->SetColor(myLabelColor[0],myLabelColor[1],myLabelColor[2]);
(myIsBoldLabel)? aLabelProp->BoldOn() : aLabelProp->BoldOff();
(myIsItalicLabel)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
(myIsShadowLabel)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
anActor->SetBarVisibility(true);
myPipeLine->GetMapper()->SetScalarVisibility(1);
- float aRange[2];
+ vtkFloatingPointType aRange[2];
myScalarMapPL->GetSourceRange(aRange);
aScalarBarCtrl->SetRangeLocal(aRange);
}
if(aScalarBarMode == VISU_ScalarBarCtrl::eGlobal){
- float aRangeGlobal[2];
+ vtkFloatingPointType aRangeGlobal[2];
//
aRangeGlobal[0] = aTMinMax.first;
aRangeGlobal[1] = aTMinMax.second;
void
VISU::GaussPoints_i
-::SetSpacing(const float theSpacing)
+::SetSpacing(const vtkFloatingPointType theSpacing)
{
mySpacing = theSpacing;
}
-float
+vtkFloatingPointType
VISU::GaussPoints_i
::GetSpacing() const
{
void
SetIsDeformed( bool theIsDeformed );
- float
+ vtkFloatingPointType
GetScaleFactor();
void
- SetScaleFactor( float theScaleFactor );
+ SetScaleFactor( vtkFloatingPointType theScaleFactor );
//! Get color for Geometry mode of the presentation.
QColor
//! Redirect the request to VISU_GaussPointsPL::SetAlphaThreshold.
void
- SetAlphaThreshold(float theAlphaThreshold);
+ SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold);
//! Redirect the request to VISU_GaussPointsPL::GetAlphaThreshold.
- float
+ vtkFloatingPointType
GetAlphaThreshold();
//! Redirect the request to VISU_GaussPointsPL::SetResolution.
GetPrimitiveType();
//! Redirect the request to VISU_GaussPointsPL::GetMaximumSupportedSize.
- float
+ vtkFloatingPointType
GetMaximumSupportedSize();
//! Redirect the request to VISU_GaussPointsPL::SetClamp.
void
- SetClamp(float theClamp);
+ SetClamp(vtkFloatingPointType theClamp);
//! Redirect the request to VISU_GaussPointsPL::GetClamp.
- float
+ vtkFloatingPointType
GetClamp();
//! Redirect the request to VISU_GaussPointsPL::SetSize.
void
- SetGeomSize(float theGeomSize);
+ SetGeomSize(vtkFloatingPointType theGeomSize);
//! Redirect the request to VISU_GaussPointsPL::GetSize.
- float
+ vtkFloatingPointType
GetGeomSize();
//! Redirect the request to VISU_GaussPointsPL::SetMinSize.
void
- SetMinSize(float theMinSize);
+ SetMinSize(vtkFloatingPointType theMinSize);
//! Redirect the request to VISU_GaussPointsPL::GetMinSize.
- float
+ vtkFloatingPointType
GetMinSize();
//! Redirect the request to VISU_GaussPointsPL::SetMaxSize.
void
- SetMaxSize(float theMaxSize);
+ SetMaxSize(vtkFloatingPointType theMaxSize);
//! Redirect the request to VISU_GaussPointsPL::GetMaxSize.
- float
+ vtkFloatingPointType
GetMaxSize();
//! Redirect the request to VISU_GaussPointsPL::SetMagnification.
void
- SetMagnification(float theMagnification);
+ SetMagnification(vtkFloatingPointType theMagnification);
//! Redirect the request to VISU_GaussPointsPL::GetMagnification.
- float
+ vtkFloatingPointType
GetMagnification();
//! Redirect the request to VISU_GaussPointsPL::SetMagnificationIncrement.
void
- SetMagnificationIncrement(float theIncrement);
+ SetMagnificationIncrement(vtkFloatingPointType theIncrement);
//! Redirect the request to VISU_GaussPointsPL::GetMagnificationIncrement.
- float
+ vtkFloatingPointType
GetMagnificationIncrement();
//! Set flag indicating which scalar bar is active.
//! Set value of the distance between global and local scalar bars.
void
- SetSpacing(const float theSpacing);
+ SetSpacing(const vtkFloatingPointType theSpacing);
//! Get value of the distance between global and local scalar bars.
- float
+ vtkFloatingPointType
GetSpacing() const;
//! Let know is the global range is already calculated
bool myIsDispGlobalScalarBar;
bool myIsActiveLocalScalarBar;
QColor myColor;
- float mySpacing;
+ vtkFloatingPointType mySpacing;
int myFaceLimit;
QString myMainTexture;
}
-void VISU::IsoSurfaces_i::SetSubRange(CORBA::Double theMin, CORBA::Double theMax){
- float aRange[2] = {theMin, theMax};
+void VISU::IsoSurfaces_i::SetSubRange(CORBA::Double theMin, CORBA::Double theMax)
+{
+ vtkFloatingPointType aRange[2] = {theMin, theMax};
myIsoSurfacesPL->SetRange(aRange);
}
CORBA::Double VISU::IsoSurfaces_i::GetSubMin(){
theActor->SetPrs3d(this);
theActor->SetShrinkFactor();
- theActor->SetPosition(myOffset);
+ theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
theActor->SetPipeLine(GetPipeLine());
theActor->SetFactory(this);
{
if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor - this = "<<this<<"; theActor = "<<theActor);
theActor->ShallowCopyPL(myPipeLine);
- theActor->SetPosition(myOffset);
+ theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
theActor->Modified();
}
void
VISU::Prs3d_i
-::SetPlaneParam (float theDir[3], float theDist, vtkPlane* thePlane)
+::SetPlaneParam (vtkFloatingPointType theDir[3],
+ vtkFloatingPointType theDist,
+ vtkPlane* thePlane)
{
myPipeLine->SetPlaneParam(theDir, theDist, thePlane);
}
//----------------------------------------------------------------------------
void
VISU::Prs3d_i
-::GetBounds(float aBounds[6])
+::GetBounds(vtkFloatingPointType aBounds[6])
{
myPipeLine->GetMapper()->GetBounds(aBounds);
}
void
VISU::Prs3d_i
-::SetOffset(const float* theOffsets)
+::SetOffset(const CORBA::Float* theOffsets)
{
myOffset[0] = theOffsets[0];
myOffset[1] = theOffsets[1];
void
VISU::Prs3d_i
-::SetOffset(float theDx, float theDy, float theDz)
+::SetOffset(CORBA::Float theDx,
+ CORBA::Float theDy,
+ CORBA::Float theDz)
{
myOffset[0] = theDx;
myOffset[1] = theDy;
void
VISU::Prs3d_i
-::GetOffset(float* theOffsets)
+::GetOffset(CORBA::Float* theOffsets)
{
theOffsets[0] = myOffset[0];
theOffsets[1] = myOffset[1];
void
VISU::Prs3d_i
-::GetOffset(float& theDx, float& theDy, float& theDz)
+::GetOffset(CORBA::Float& theDx,
+ CORBA::Float& theDy,
+ CORBA::Float& theDz)
{
theDx = myOffset[0];
theDy = myOffset[1];
GetClippingPlane(vtkIdType theID) const;
void
- SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane);
+ SetPlaneParam(vtkFloatingPointType theDir[3],
+ vtkFloatingPointType theDist,
+ vtkPlane* thePlane);
//----------------------------------------------------------------------------
void
- GetBounds(float aBounds[6]);
+ GetBounds(vtkFloatingPointType aBounds[6]);
void
- SetOffset(const float* theOffsets);
+ SetOffset(const CORBA::Float* theOffsets);
virtual
void
- SetOffset(float theDx, float theDy, float theDz);
+ SetOffset(CORBA::Float theDx,
+ CORBA::Float theDy,
+ CORBA::Float theDz);
void
- GetOffset(float* theOffsets);
+ GetOffset(CORBA::Float* theOffsets);
virtual
void
- GetOffset(float& theDx, float& theDy, float& theDz);
+ GetOffset(CORBA::Float& theDx,
+ CORBA::Float& theDy,
+ CORBA::Float& theDz);
//----------------------------------------------------------------------------
protected:
CheckDataSet();
bool myAddToStudy;
- float myOffset[3];
+ CORBA::Float myOffset[3];
Result_i *myResult;
VISU_PipeLine *myPipeLine;
SALOMEDS::SObject_var mySObject;
//function : GetAxisInfo
//purpose :
//=======================================================================
-const vector< float >* Result_i::GetAxisInfo(const string& theMeshName,
- TAxis theAxis,
- gp_Dir& thePlaneNormal)
+const Result_i::TAxisInfo*
+Result_i
+::GetAxisInfo(const string& theMeshName,
+ TAxis theAxis,
+ gp_Dir& thePlaneNormal)
{
- const vector< float >* components = NULL;
+ const TAxisInfo* components = NULL;
if ( theAxis < AXIS_X || theAxis > AXIS_Z ) {
MESSAGE(" Bad axis index " << theAxis );
if ( nbPnt != 8 )
continue;
vtkPoints * points = cell->GetPoints();
- float* coords[ 4 ];
+ vtkFloatingPointType* coords[ 4 ];
coords[0] = points->GetPoint( 0 );
coords[1] = points->GetPoint( 1 );
coords[2] = points->GetPoint( 3 );
gp_Pnt p0( coords[0][0], coords[0][1], coords[0][2] );
for ( iAx = 0; iAx < nbAxes; ++iAx )
{
- float* coo = coords[ iAx + 1 ];
+ vtkFloatingPointType* coo = coords[ iAx + 1 ];
gp_Pnt p( coo[0], coo[1], coo[2] );
// min size
- float size = p0.SquareDistance( p );
+ vtkFloatingPointType size = p0.SquareDistance( p );
if ( size > FLT_MIN && size < minSize[ iAx ] )
minSize[ iAx ] = size;
// axis direction
// get and sort intermediate component values - projections of nodes
// on axis direction; define bnd box
- set< float > comps[ 3 ];
+ set< vtkFloatingPointType > comps[ 3 ];
Bnd_Box box;
vtkPoints * points = aMesh->GetPoints();
vtkIdType iP, nbP = aMesh->GetNumberOfPoints();
for ( iP = 0; iP < nbP; ++iP )
{
- float* coo = points->GetPoint( iP );
+ vtkFloatingPointType* coo = points->GetPoint( iP );
gp_Pnt p( coo[0], coo[1], coo[2] );
box.Add( p );
for ( iAx = 0; iAx < nbAxes; ++iAx ) {
const gp_Dir& dir = gInfo->myAxis[ iAx ];
- float dot = dir.XYZ() * p.XYZ();
+ vtkFloatingPointType dot = dir.XYZ() * p.XYZ();
comps[ iAx ].insert( dot );
}
}
// find a range of projections of bnd box corners on each axis
- float range[3], firstValue[3];
+ vtkFloatingPointType range[3], firstValue[3];
double x[2],y[2],z[2];
box.Get(x[0],y[0],z[0],x[1],y[1],z[1]);
for ( iAx = 0; iAx < nbAxes; ++iAx ) {
- set< float > bndComps;
+ set< vtkFloatingPointType > bndComps;
const gp_Dir& dir = gInfo->myAxis[ iAx ];
for ( int iX = 0; iX < 2; ++iX ) {
for ( int iY = 0; iY < 2; ++iY ) {
for ( int iZ = 0; iZ < 2; ++iZ ) {
gp_Pnt p( x[ iX ], y[ iY ], z[ iZ ] );
- float dot = dir.XYZ() * p.XYZ();
+ vtkFloatingPointType dot = dir.XYZ() * p.XYZ();
bndComps.insert( dot );
}
}
// compute component values
for ( iAx = 0; iAx < nbAxes; ++iAx )
{
- list< float > values;
+ list< vtkFloatingPointType > values;
int nbVals = 0;
- set< float >& comp = comps[ iAx ];
- set< float >::iterator val = comp.begin();
- float bnd = -1., rng = range[ iAx ], first = firstValue[ iAx ];
- float tol = 0.1 * sqrt( minSize[ iAx ]) / rng;
+ set< vtkFloatingPointType >& comp = comps[ iAx ];
+ set< vtkFloatingPointType >::iterator val = comp.begin();
+ vtkFloatingPointType bnd = -1., rng = range[ iAx ], first = firstValue[ iAx ];
+ vtkFloatingPointType tol = 0.1 * sqrt( minSize[ iAx ]) / rng;
for ( ; val != comp.end(); ++val ) {
- float value = ( *val - first ) / rng;
+ vtkFloatingPointType value = ( *val - first ) / rng;
if ( value > bnd ) {
values.push_back( value );
bnd = value + tol;
}
}
// store values in gInfo
- vector< float >& myComp = gInfo->myComponets[ iAx ];
+ vector< vtkFloatingPointType >& myComp = gInfo->myComponets[ iAx ];
myComp.resize( nbVals );
- list< float >::iterator v = values.begin();
+ list< vtkFloatingPointType >::iterator v = values.begin();
for ( int i = 0; v != values.end(); ++v )
myComp[ i++ ] = *v;
}
#include "VISU_BoostSignals.h"
#include "SALOME_GenericObj_i.hh"
+#include "VTKViewer.h"
+
#include <gp_Dir.hxx>
#include <vector>
// Info on structured mesh contained in TInput
public:
typedef enum { AXIS_X = 0, AXIS_Y, AXIS_Z } TAxis;
- const std::vector< float >* GetAxisInfo(const std::string& theMeshName,
- TAxis theAxis,
- gp_Dir& thePlaneNormal);
+ typedef std::vector< vtkFloatingPointType > TAxisInfo;
+ const TAxisInfo* GetAxisInfo(const std::string& theMeshName,
+ TAxis theAxis,
+ gp_Dir& thePlaneNormal);
// Return i,j or k values and cutting plane normal for theAxis.
// In the case of any problems, return NULL pointer
private:
struct TGridInfo {
- std::vector< float > myComponets[ 3 ];
- gp_Dir myAxis [ 3 ];
+ TAxisInfo myComponets[ 3 ];
+ gp_Dir myAxis [ 3 ];
};
- map< string, TGridInfo > myMeshName2GridInfoMap;
+ std::map< std::string, TGridInfo > myMeshName2GridInfoMap;
};
Result_var FindResult(SALOMEDS::SObject_ptr theSObject);
}
void VISU::ScalarMapOnDeformedShape_i::SetSourceRange(CORBA::Double theMinRange,CORBA::Double theMaxRange){
- float aRange[2];
- aRange[0] = float(theMinRange);
- aRange[1] = float(theMaxRange);
+ vtkFloatingPointType aRange[2];
+ aRange[0] = vtkFloatingPointType(theMinRange);
+ aRange[1] = vtkFloatingPointType(theMaxRange);
myScalarMapOnDeformedShapePL->SetScalarRange(aRange);
}
CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMin(){
- float aRange[2];
+ vtkFloatingPointType aRange[2];
myScalarMapOnDeformedShapePL->GetSourceRange(aRange);
return aRange[0];
}
CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMax(){
- float aRange[2];
+ vtkFloatingPointType aRange[2];
myScalarMapOnDeformedShapePL->GetSourceRange(aRange);
return aRange[1];
}
void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
const char* theFieldName,
- const int theIteration,
- const VISU::TEntity theEntity)
+ int theIteration,
+ VISU::TEntity theEntity)
{
if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::SetScalarField:"<<__LINE__<<endl;
if(MYDEBUG) cout << "\ttheFieldName="<<theFieldName<<endl;
void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
const char* theFieldName,
- const long theIteration,
- const VISU::Entity theEntity)
+ CORBA::Long theIteration,
+ VISU::Entity theEntity)
{
this->SetScalarField(theMeshName,theFieldName,(int)theIteration,VISU::TEntity(theEntity));
}
virtual void SetScalarField(const char* theMeshName,
const char* theFieldName,
- const int theIteration,
- const VISU::TEntity theEntity);
+ int theIteration,
+ VISU::TEntity theEntity);
virtual void SetScalarField(const char* theMeshName,
const char* theFieldName,
- const long theIteration,
- const VISU::Entity theEntity);
+ CORBA::Long theIteration,
+ VISU::Entity theEntity);
virtual void SetScalarFieldName(const char* theName);
virtual std::string GetScalarFieldName();
{
if(theMin > theMax)
return;
- float aScalarRange[2] = {theMin, theMax};
+ vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
myScalarMapPL->SetScalarRange(aScalarRange);
myIsFixedRange = true;
}
vtkTextProperty* aTitleProp = aScalarBar->GetTitleTextProperty();
aTitleProp->SetFontFamily(myTitFontType);
- aTitleProp->SetColor(myTitleColor);
+ aTitleProp->SetColor(myTitleColor[0],myTitleColor[1],myTitleColor[2]);
(myIsBoldTitle)? aTitleProp->BoldOn() : aTitleProp->BoldOff();
(myIsItalicTitle)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
(myIsShadowTitle)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
vtkTextProperty* aLabelProp = aScalarBar->GetLabelTextProperty();
aLabelProp->SetFontFamily(myLblFontType);
- aLabelProp->SetColor(myLabelColor);
+ aLabelProp->SetColor(myLabelColor[0],myLabelColor[1],myLabelColor[2]);
(myIsBoldLabel)? aLabelProp->BoldOn() : aLabelProp->BoldOff();
(myIsItalicLabel)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
(myIsShadowLabel)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
class SVTK_ViewWindow;
class VISU_Actor;
-namespace VISU{
+namespace VISU
+{
class Result_i;
class ColoredPrs3d_i;
}
std::vector<VISU::ColoredPrs3d_i*> myPrs; // Presentations
std::vector<VISU_Actor*> myActors; // Actors
std::vector<double> myTiming; // time values
- float myOffset[3];
+ CORBA::Float myOffset[3];
};
}else{
if(SUIT_ViewManager* aViewManager = myApplication->activeViewManager()){
if(SUIT_ViewWindow* aView = aViewManager->getActiveView()){
- if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aView)){
+ if(dynamic_cast<SVTK_ViewWindow*>(aView)){
myView3D->myViewManager = aViewManager;
myResult = aViewManager->getActiveView();
}
{
Storable::DataToStream(theStr,"myType",VISU::TVIEW3D);
- float backint[3];
+ vtkFloatingPointType backint[3];
GetRenderer(theViewWindow)->GetBackground(backint);
Storable::DataToStream(theStr,"myColor.R",backint[0]);
Storable::DataToStream(theStr,"myColor.G",backint[1]);
SALOMEDS::Color View3D_i::GetBackground (SUIT_ViewWindow* theViewWindow)
{
SALOMEDS::Color aColor;
- float backint[3];
+ vtkFloatingPointType backint[3];
GetRenderer(theViewWindow)->GetBackground(backint);
aColor.R = backint[0]; aColor.G = backint[1]; aColor.B = backint[2];
return aColor;