void
VISU_Actor
-::SetShrinkFactor(float theValue)
+::SetShrinkFactor(vtkFloatingPointType theValue)
{
myShrinkFilter->SetShrinkFactor(theValue);
Modified();
}
-float
+vtkFloatingPointType
VISU_Actor
::GetShrinkFactor()
{
//----------------------------------------------------------------------------
void
VISU_Actor
-::SetOpacity(float theValue)
+::SetOpacity(vtkFloatingPointType theValue)
{
GetProperty()->SetOpacity(theValue);
}
-float
+vtkFloatingPointType
VISU_Actor
::GetOpacity()
{
void
VISU_Actor
-::SetLineWidth(float theLineWidth)
+::SetLineWidth(vtkFloatingPointType theLineWidth)
{
GetProperty()->SetLineWidth(theLineWidth);
}
-float
+vtkFloatingPointType
VISU_Actor
::GetLineWidth()
{
return GetCurrentPL()->GetNodeVTKID(theID);
}
-float*
+vtkFloatingPointType*
VISU_Actor
::GetNodeCoord(int theObjID)
{
if(vtkCell* aCell = GetElemCell(anObjId)){
vtkPoints* aPts = aCell->GetPoints();
if(int aNbPts = aCell->GetNumberOfPoints()){
- float aCoord[3] = {0.0, 0.0, 0.0};
+ vtkFloatingPointType aCoord[3] = {0.0, 0.0, 0.0};
for(int i = 0; i < aNbPts; i++){
- float *aPntCoord = aPts->GetPoint(i);
+ vtkFloatingPointType *aPntCoord = aPts->GetPoint(i);
aCoord[0] += aPntCoord[0];
aCoord[1] += aPntCoord[1];
aCoord[2] += aPntCoord[2];
}
// Display coordinates
- float aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
+ vtkFloatingPointType aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
aRenderer->SetWorldPoint(aWorldCoord);
aRenderer->WorldToDisplay();
- float aSelectionPoint[3];
+ vtkFloatingPointType aSelectionPoint[3];
aRenderer->GetDisplayPoint(aSelectionPoint);
myAnnotationActor->SetPosition(aSelectionPoint);
//
vtkIdType aVtkId = myPointPicker->GetPointId();
if(aVtkId >= 0 && mySelector->IsValid(this,aVtkId,true) && hasIO()){
vtkIdType anObjId = GetNodeObjId( aVtkId );
- if(float* aCoord = GetNodeCoord(anObjId)){
+ if(vtkFloatingPointType* aCoord = GetNodeCoord(anObjId)){
// Display coordinates
- float aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
+ vtkFloatingPointType aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
aRenderer->SetWorldPoint(aWorldCoord);
aRenderer->WorldToDisplay();
- float aSelectionPoint[3];
+ vtkFloatingPointType aSelectionPoint[3];
aRenderer->GetDisplayPoint(aSelectionPoint);
myAnnotationActor->SetPosition(aSelectionPoint);
//
virtual
void
- SetShrinkFactor(float theFactor = 0.8);
+ SetShrinkFactor(vtkFloatingPointType theFactor = 0.8);
virtual
- float
+ vtkFloatingPointType
GetShrinkFactor();
//----------------------------------------------------------------------------
virtual
void
- SetOpacity(float theValue);
+ SetOpacity(vtkFloatingPointType theValue);
virtual
- float
+ vtkFloatingPointType
GetOpacity();
virtual
void
- SetLineWidth(float theLineWidth);
+ SetLineWidth(vtkFloatingPointType theLineWidth);
virtual
- float
+ vtkFloatingPointType
GetLineWidth();
//----------------------------------------------------------------------------
GetNodeVTKID(vtkIdType theID);
virtual
- float*
+ vtkFloatingPointType*
GetNodeCoord(vtkIdType theObjID);
virtual
return Superclass::GetMapper();
}
-float*
+vtkFloatingPointType*
VISU_GaussPtsAct
::GetBounds()
{
{
myEventCallbackCommand->SetAbortFlag(1);
- float aMagnification = myInsideCursorSettings->GetMagnification();
- float anIncrement = myInsideCursorSettings->GetIncrement();
- float coefficient = up ? anIncrement : 1 / anIncrement;
+ vtkFloatingPointType aMagnification = myInsideCursorSettings->GetMagnification();
+ vtkFloatingPointType anIncrement = myInsideCursorSettings->GetIncrement();
+ vtkFloatingPointType coefficient = up ? anIncrement : 1 / anIncrement;
myInsideCursorSettings->SetMagnification( aMagnification * coefficient );
myInsideCursorSettings->InvokeEvent(VISU::UpdateFromSettingsEvent,NULL);
namespace
{
inline
- float
+ vtkFloatingPointType
GetRadius(vtkIdType theVTKID,
vtkDataArray *theScalarArray,
VISU_GaussPointsPL* theGaussPointsPL)
{
- float aRadius = 0.5;
+ vtkFloatingPointType aRadius = 0.5;
if(theGaussPointsPL->GetPSMapper()->GetPointSpriteMode() == 1) // Geometry mode
aRadius *= theGaussPointsPL->GetSize() * theGaussPointsPL->GetAverageCellSize();
else if(theGaussPointsPL->GetBicolor()){
- float aVal = theScalarArray->GetTuple1(theVTKID);
+ vtkFloatingPointType aVal = theScalarArray->GetTuple1(theVTKID);
if(aVal > 0.0)
aRadius *= theGaussPointsPL->GetMaxSize();
else
}
}
-float
+vtkFloatingPointType
VISU_GaussPtsAct
::GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
}
//----------------------------------------------------------------------------
-float
+vtkFloatingPointType
VISU_GaussPtsAct
::GetMagnification(vtkIdType theObjID)
{
namespace
{
inline
- float
+ vtkFloatingPointType
GetClamp(VISU_GaussPointsPL* theGaussPointsPL)
{
- float aClamp = theGaussPointsPL->GetClamp();
+ vtkFloatingPointType aClamp = theGaussPointsPL->GetClamp();
if(theGaussPointsPL->GetPrimitiveType() == VISU_OpenGLPointSpriteMapper::GeomSphere)
return -aClamp;
return aClamp;
}
}
-float
+vtkFloatingPointType
VISU_GaussPtsAct
::GetClamp(vtkIdType theObjID)
{
if(myIsPreselected){
anIsChanged = (myLastObjPointID != anObjId);
if(anIsChanged){
- float* aNodeCoord = GetNodeCoord(anObjId);
+ vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId);
vtkDataSet* aDataSet = GetInput();
vtkCellData* aCellData = aDataSet->GetCellData();
if(vtkDataArray *aScalarArray = aCellData->GetScalars()){
- float aPyramidHeight = myPickingSettings->GetPyramidHeight();
+ vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
- //float aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
- float aColor[3];
+ //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
+ vtkFloatingPointType aColor[3];
theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor );
aColor[0] = 1. - aColor[0];
aColor[1] = 1. - aColor[1];
if(theInitialHasIndex + aCurrentHasIndex == 1){
vtkRenderer *aRenderer = theInteractorStyle->GetCurrentRenderer();
vtkCamera *aCamera = aRenderer->GetActiveCamera();
- float aZoomFactor = thePickingSettings->GetZoomFactor();
+ vtkFloatingPointType aZoomFactor = thePickingSettings->GetZoomFactor();
double aScale = aCamera->GetParallelScale();
if (!theInitialHasIndex && aCurrentHasIndex) {
aCamera->SetParallelScale(aScale/aZoomFactor);
mySelector->AddIObject(this);
}
//
- float* aNodeCoord = GetNodeCoord(anObjId);
+ vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId);
//
// FlyTo
vtkRenderWindowInteractor* anInteractor = theInteractorStyle->GetInteractor();
- float aDollyWas = anInteractor->GetDolly();
+ vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
anInteractor->SetDolly(0.);
//
vtkIdType aVtkId = GetNodeVTKID(anObjId);
if(aVtkId >= 0){
- float *aNodeCoord = GetNodeCoord(anObjId);
- float aWorldCoord[4] = {aNodeCoord[0], aNodeCoord[1], aNodeCoord[2], 1.};
+ vtkFloatingPointType *aNodeCoord = GetNodeCoord(anObjId);
+ vtkFloatingPointType aWorldCoord[4] = {aNodeCoord[0], aNodeCoord[1], aNodeCoord[2], 1.};
//
vtkDataSet* aDataSet = GetInput();
vtkCellData* aDataSetAttributes = aDataSet->GetCellData();
//
if(vtkDataArray* aScalarArray = aDataSetAttributes->GetScalars()){
- float aVal = aScalarArray->GetTuple1(aVtkId);
+ vtkFloatingPointType aVal = aScalarArray->GetTuple1(aVtkId);
//
GetScalarBarCtrl()->SetIsMarked(true);
GetScalarBarCtrl()->SetMarkValue(aVal);
GetScalarBarCtrl()->Update();
//
- float aPyramidHeight = myPickingSettings->GetPyramidHeight();
+ vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
myCursorPyramidSelected->Init(aPyramidHeight,
myPickingSettings->GetCursorSize(),
aStr<<"\nData: {";
int anId = 0;
while(anId < aNbComp){
- float aComp = aFloatArray->GetComponent(aVtkId,anId++);
+ vtkFloatingPointType aComp = aFloatArray->GetComponent(aVtkId,anId++);
aStr<<aComp;
if(anId < aNbComp)
aStr<<"; ";
myTextActor->SetModePosition(myPickingSettings->GetInfoWindowPosition());
myTextActor->SetTransparency(myPickingSettings->GetInfoWindowTransparency());
- float aHeight = myGaussPointsPL->GetMaxPointSize()*myPickingSettings->GetPyramidHeight();
- float aCursorSize = myPickingSettings->GetCursorSize();
+ vtkFloatingPointType aHeight = myGaussPointsPL->GetMaxPointSize()*myPickingSettings->GetPyramidHeight();
+ vtkFloatingPointType aCursorSize = myPickingSettings->GetCursorSize();
myCursorPyramid->SetPreferences(aHeight,aCursorSize);
myCursorPyramidSelected->SetPreferences(aHeight,aCursorSize);
//----------------------------------------------------------------------------
-float
+vtkFloatingPointType
VISU_GaussPtsAct1
::GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
//----------------------------------------------------------------------------
-float
+vtkFloatingPointType
VISU_GaussPtsAct1
::GetMagnification(vtkIdType theObjID)
{
//----------------------------------------------------------------------------
-float
+vtkFloatingPointType
VISU_GaussPtsAct1
::GetClamp(vtkIdType theObjID)
{
SALOME_ExtractGeometry* anExtractGeometry = aPipeline->GetExtractGeometryFilter();
vtkImplicitFunction* anImplicitFunction = anExtractGeometry->GetImplicitFunction();
- float aMagnification = aPipeline->GetMagnification();
+ vtkFloatingPointType aMagnification = aPipeline->GetMagnification();
aPipeline->ShallowCopy(GetGaussPointsPL());
//! Redefined method of getting an actor bounds.
virtual
- float*
+ vtkFloatingPointType*
GetBounds();
//! Redefined method of getting an actor input.
//! To get current value of the radius of the Point Sprite
virtual
- float
+ vtkFloatingPointType
GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
vtkDataArray *theScalarArray);
//! To get current value of the magnification
virtual
- float
+ vtkFloatingPointType
GetMagnification(vtkIdType theObjID);
//! To get current value of the clamp
virtual
- float
+ vtkFloatingPointType
GetClamp(vtkIdType theObjID);
//----------------------------------------------------------------------------
void
OnInteractorEvent(unsigned long theEvent);
- float myPriority;
+ vtkFloatingPointType myPriority;
bool myChangeMagnification;
VISU::TGaussPtsActorFactory* myGaussPtsActorFactory;
boost::signal1<void,VISU_GaussPtsAct*> myUpdatePrs3dSignal;
//! To get current value of the radius of the Point Sprite
virtual
- float
+ vtkFloatingPointType
GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
vtkDataArray *theScalarArray);
//! To get current value of the magnification
virtual
- float
+ vtkFloatingPointType
GetMagnification(vtkIdType theObjID);
//! To get current value of the clamp
virtual
- float
+ vtkFloatingPointType
GetClamp(vtkIdType theObjID);
//----------------------------------------------------------------------------
}
this->SetScale(1.0);
- float aMRadius = myRadius*myMagnification;
+ vtkFloatingPointType aMRadius = myRadius*myMagnification;
Init(myHeight,aMRadius*myCursorSize);
if(myClamp > 0.0f){
- float aPoint1[3] = {0.0, 0.0, 0.0};
+ vtkFloatingPointType aPoint1[3] = {0.0, 0.0, 0.0};
ren->SetDisplayPoint(aPoint1);
ren->DisplayToWorld();
ren->GetWorldPoint(aPoint1);
- float aPoint2[3] = {0.0, myClamp, 0.0};
+ vtkFloatingPointType aPoint2[3] = {0.0, myClamp, 0.0};
ren->SetDisplayPoint(aPoint2);
ren->DisplayToWorld();
ren->GetWorldPoint(aPoint2);
- float aWorldClamp =
+ vtkFloatingPointType aWorldClamp =
(aPoint2[0] - aPoint1[0])*(aPoint2[0] - aPoint1[0]) +
(aPoint2[1] - aPoint1[1])*(aPoint2[1] - aPoint1[1]) +
(aPoint2[2] - aPoint1[2])*(aPoint2[2] - aPoint1[2]);
aWorldClamp = sqrt(aWorldClamp);
- float aMDiameter = 2.0 * aMRadius;
- float aCoeff = aWorldClamp / aMDiameter;
+ vtkFloatingPointType aMDiameter = 2.0 * aMRadius;
+ vtkFloatingPointType aCoeff = aWorldClamp / aMDiameter;
if(aCoeff < 1.0){
this->SetScale(aCoeff);
//----------------------------------------------------------------------------
void
VISU_CursorPyramid
-::SetPreferences(float theHeight,
- float theCursorSize)
+::SetPreferences(vtkFloatingPointType theHeight,
+ vtkFloatingPointType theCursorSize)
{
Init(theHeight, theCursorSize, myRadius, myMagnification, myClamp, GetPosition(), GetProperty()->GetColor());
}
//----------------------------------------------------------------------------
void
VISU_CursorPyramid
-::Init(float theHeight,
- float theCursorSize,
- float theRadius,
- float theMagnification,
- float theClamp,
- float thePos[3],
- float theColor[3])
+::Init(vtkFloatingPointType theHeight,
+ vtkFloatingPointType theCursorSize,
+ vtkFloatingPointType theRadius,
+ vtkFloatingPointType theMagnification,
+ vtkFloatingPointType theClamp,
+ vtkFloatingPointType thePos[3],
+ vtkFloatingPointType theColor[3])
{
Init(theHeight,theRadius*theMagnification*theCursorSize);
SetPosition(thePos[0],thePos[1],thePos[2]);
void
VISU_CursorPyramid
-::Init(float theHeight,
- float theRadius)
+::Init(vtkFloatingPointType theHeight,
+ vtkFloatingPointType theRadius)
{
for(int i = 0; i < myNbCones; ++i){
vtkConeSource* aSource = mySources[i].GetPointer();
aSource->SetAngle(20.0);
}
- float aDisplacement = -0.5*theHeight - theRadius;
+ vtkFloatingPointType aDisplacement = -0.5*theHeight - theRadius;
// X
mySources[0]->SetDirection(1.0, 0.0, 0.0);
// function : SetTransparency
// purpose :
//==================================================================
-void VISU_FramedTextActor::SetTransparency(const float theTransparency)
+void VISU_FramedTextActor::SetTransparency(const vtkFloatingPointType theTransparency)
{
if (theTransparency>=0. && theTransparency<=1.){
myTransparency=theTransparency;
// function : GetTransparency
// purpose :
//==================================================================
-float VISU_FramedTextActor::GetTransparency()const
+vtkFloatingPointType VISU_FramedTextActor::GetTransparency()const
{
return myTransparency;
}
// function : SetWorldPoint
// purpose :
//==================================================================
-void VISU_FramedTextActor::SetWorldPoint(const float theWorldPoint[4])
+void VISU_FramedTextActor::SetWorldPoint(const vtkFloatingPointType theWorldPoint[4])
{
for(int i = 0; i<4; ++i) {
myWorldPoint[i] = theWorldPoint[i];
// function : GetWorldPoint
// purpose :
//==================================================================
-const float* VISU_FramedTextActor::GetWorldPoint()const
+const vtkFloatingPointType* VISU_FramedTextActor::GetWorldPoint()const
{
return myWorldPoint;
}
// function : SetDistance
// purpose :
//==================================================================
-void VISU_FramedTextActor::SetDistance(const float theDistance)
+void VISU_FramedTextActor::SetDistance(const vtkFloatingPointType theDistance)
{
myDistance=theDistance;
}
// function : GetDistance
// purpose :
//==================================================================
-float VISU_FramedTextActor::GetDistance()const
+vtkFloatingPointType VISU_FramedTextActor::GetDistance()const
{
return myDistance;
}
theViewport->SetWorldPoint(myWorldPoint);
theViewport->WorldToDisplay();
- float aSelectionPoint[3];
+ vtkFloatingPointType aSelectionPoint[3];
theViewport->GetDisplayPoint(aSelectionPoint);
- float u = aSelectionPoint[0];
- float v = aSelectionPoint[1] - myDistance;
+ vtkFloatingPointType u = aSelectionPoint[0];
+ vtkFloatingPointType v = aSelectionPoint[1] - myDistance;
theViewport->ViewportToNormalizedViewport(u, v);
PositionCoordinate->SetValue(u, v);
//
RemoveFromRender(vtkRenderer* theRenderer);
void
- Init(float theHeight,
- float theCursorSize,
- float theRadius,
- float theMagnification,
- float theClamp,
- float thePos[3],
- float theColor[3]);
+ Init(vtkFloatingPointType theHeight,
+ vtkFloatingPointType theCursorSize,
+ vtkFloatingPointType theRadius,
+ vtkFloatingPointType theMagnification,
+ vtkFloatingPointType theClamp,
+ vtkFloatingPointType thePos[3],
+ vtkFloatingPointType theColor[3]);
- void SetPreferences(float theHeight,
- float theCursorSize);
+ void SetPreferences(vtkFloatingPointType theHeight,
+ vtkFloatingPointType theCursorSize);
protected:
VISU_CursorPyramid();
void
- Init(float theHeight,
- float theRadius);
+ Init(vtkFloatingPointType theHeight,
+ vtkFloatingPointType theRadius);
int myNbCones;
vtkSmartPointer<vtkConeSource> mySources[6];
vtkSmartPointer<vtkAppendPolyData> myAppendFilter;
vtkSmartPointer<vtkPolyDataMapper> myMapper;
//
- float myHeight;
- float myCursorSize;
- float myRadius;
- float myMagnification;
- float myClamp;
+ vtkFloatingPointType myHeight;
+ vtkFloatingPointType myCursorSize;
+ vtkFloatingPointType myRadius;
+ vtkFloatingPointType myMagnification;
+ vtkFloatingPointType myClamp;
private:
VISU_CursorPyramid(const VISU_CursorPyramid&); // Not implemented
void SetModePosition(const int theMode);
int GetModePosition()const;
//
- void SetWorldPoint(const float theWorldPoint[4]);
- const float* GetWorldPoint()const;
+ void SetWorldPoint(const vtkFloatingPointType theWorldPoint[4]);
+ const vtkFloatingPointType* GetWorldPoint()const;
//
- void SetDistance(const float theDistance);
- float GetDistance()const;
+ void SetDistance(const vtkFloatingPointType theDistance);
+ vtkFloatingPointType GetDistance()const;
//
- void SetTransparency(const float theTransparency);
- float GetTransparency()const;
+ void SetTransparency(const vtkFloatingPointType theTransparency);
+ vtkFloatingPointType GetTransparency()const;
//
protected:
VISU_FramedTextActor();
vtkTimeStamp myBuildTime;
//
int myModePosition;
- float myWorldPoint[4];
- float myDistance;
- float myTransparency;
+ vtkFloatingPointType myWorldPoint[4];
+ vtkFloatingPointType myDistance;
+ vtkFloatingPointType myTransparency;
private:
VISU_FramedTextActor(const VISU_FramedTextActor&); // Not implemented.
vtkSetMacro( PrimitiveType, int );
vtkGetMacro( PrimitiveType, int );
- vtkSetMacro( Clamp, float );
- vtkGetMacro( Clamp, float );
+ vtkSetMacro( Clamp, vtkFloatingPointType );
+ vtkGetMacro( Clamp, vtkFloatingPointType );
vtkSetMacro( Texture, vtkImageData* );
vtkGetMacro( Texture, vtkImageData* );
- vtkSetMacro( AlphaThreshold, float );
- vtkGetMacro( AlphaThreshold, float );
+ vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
+ vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
vtkSetMacro( Resolution, int );
vtkGetMacro( Resolution, int );
- vtkSetMacro( Magnification, float );
- vtkGetMacro( Magnification, float );
+ vtkSetMacro( Magnification, vtkFloatingPointType );
+ vtkGetMacro( Magnification, vtkFloatingPointType );
- vtkSetMacro( Increment, float );
- vtkGetMacro( Increment, float );
+ vtkSetMacro( Increment, vtkFloatingPointType );
+ vtkGetMacro( Increment, vtkFloatingPointType );
protected:
bool Initial;
int PrimitiveType;
- float Clamp;
+ vtkFloatingPointType Clamp;
vtkImageData* Texture;
- float AlphaThreshold;
+ vtkFloatingPointType AlphaThreshold;
int Resolution;
- float Magnification;
- float Increment;
+ vtkFloatingPointType Magnification;
+ vtkFloatingPointType Increment;
};
VISU_InsideCursorSettings*
New();
- vtkSetMacro( MinSize, float );
- vtkGetMacro( MinSize, float );
+ vtkSetMacro( MinSize, vtkFloatingPointType );
+ vtkGetMacro( MinSize, vtkFloatingPointType );
- vtkSetMacro( MaxSize, float );
- vtkGetMacro( MaxSize, float );
+ vtkSetMacro( MaxSize, vtkFloatingPointType );
+ vtkGetMacro( MaxSize, vtkFloatingPointType );
protected:
- float MinSize;
- float MaxSize;
+ vtkFloatingPointType MinSize;
+ vtkFloatingPointType MaxSize;
};
VISU_OutsideCursorSettings*
New();
- vtkSetMacro( Size, float );
- vtkGetMacro( Size, float );
+ vtkSetMacro( Size, vtkFloatingPointType );
+ vtkGetMacro( Size, vtkFloatingPointType );
vtkSetMacro( Uniform, bool );
vtkGetMacro( Uniform, bool );
- vtkSetVector3Macro( Color, float );
- vtkGetVector3Macro( Color, float );
+ vtkSetVector3Macro( Color, vtkFloatingPointType );
+ vtkGetVector3Macro( Color, vtkFloatingPointType );
protected:
- float Size;
+ vtkFloatingPointType Size;
bool Uniform;
- float Color[3];
+ vtkFloatingPointType Color[3];
};
vtkSetMacro( Initial, bool );
vtkGetMacro( Initial, bool );
- vtkSetMacro( PyramidHeight, float );
- vtkGetMacro( PyramidHeight, float );
+ vtkSetMacro( PyramidHeight, vtkFloatingPointType );
+ vtkGetMacro( PyramidHeight, vtkFloatingPointType );
- vtkSetMacro( CursorSize, float );
- vtkGetMacro( CursorSize, float );
+ vtkSetMacro( CursorSize, vtkFloatingPointType );
+ vtkGetMacro( CursorSize, vtkFloatingPointType );
- vtkSetVector3Macro( Color, float );
- vtkGetVector3Macro( Color, float );
+ vtkSetVector3Macro( Color, vtkFloatingPointType );
+ vtkGetVector3Macro( Color, vtkFloatingPointType );
- vtkSetMacro( PointTolerance, float );
- vtkGetMacro( PointTolerance, float );
+ vtkSetMacro( PointTolerance, vtkFloatingPointType );
+ vtkGetMacro( PointTolerance, vtkFloatingPointType );
- vtkSetMacro( InfoWindowTransparency, float );
- vtkGetMacro( InfoWindowTransparency, float );
+ vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
+ vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
vtkSetMacro( InfoWindowPosition, int );
vtkGetMacro( InfoWindowPosition, int );
- vtkSetMacro( ZoomFactor, float );
- vtkGetMacro( ZoomFactor, float );
+ vtkSetMacro( ZoomFactor, vtkFloatingPointType );
+ vtkGetMacro( ZoomFactor, vtkFloatingPointType );
vtkSetMacro( StepNumber, int );
vtkGetMacro( StepNumber, int );
private:
bool Initial;
- float PyramidHeight;
- float CursorSize;
- float PointTolerance;
- float Color[3];
- float InfoWindowTransparency;
+ vtkFloatingPointType PyramidHeight;
+ vtkFloatingPointType CursorSize;
+ vtkFloatingPointType PointTolerance;
+ vtkFloatingPointType Color[3];
+ vtkFloatingPointType InfoWindowTransparency;
int InfoWindowPosition;
- float ZoomFactor;
+ vtkFloatingPointType ZoomFactor;
int StepNumber;
bool DisplayParentMesh;
};
void
VISU_MeshAct
-::SetShrinkFactor(float theValue)
+::SetShrinkFactor(vtkFloatingPointType theValue)
{
Superclass::SetShrinkFactor(theValue);
//----------------------------------------------------------------------------
void
VISU_MeshAct
-::SetOpacity(float theValue)
+::SetOpacity(vtkFloatingPointType theValue)
{
GetSurfaceProperty()->SetOpacity(theValue);
}
-float
+vtkFloatingPointType
VISU_MeshAct
::GetOpacity()
{
//----------------------------------------------------------------------------
void
VISU_MeshAct
-::SetLineWidth(float theLineWidth)
+::SetLineWidth(vtkFloatingPointType theLineWidth)
{
GetEdgeProperty()->SetLineWidth(theLineWidth);
}
-float
+vtkFloatingPointType
VISU_MeshAct::GetLineWidth()
{
return GetEdgeProperty()->GetLineWidth();
virtual
void
- SetOpacity(float theValue);
+ SetOpacity(vtkFloatingPointType theValue);
virtual
- float
+ vtkFloatingPointType
GetOpacity();
virtual
void
- SetLineWidth(float theLineWidth);
+ SetLineWidth(vtkFloatingPointType theLineWidth);
virtual
- float
+ vtkFloatingPointType
GetLineWidth();
virtual
virtual
void
- SetShrinkFactor(float theFactor = 0.8);
+ SetShrinkFactor(vtkFloatingPointType theFactor = 0.8);
virtual
void
myEventCallbackCommand->SetClientData(this);
myEventCallbackCommand->SetCallback(VVTK_PickingDlg::ProcessEvents);
- SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
-
setCaption( tr( "PICKING_DLG_TITLE" ) );
setSizeGripEnabled(TRUE);
myStepNumberSpinBox->setValue( myPickingSettings->GetStepNumber() );
myDisplayParentMeshCheckBox->setChecked( myPickingSettings->GetDisplayParentMesh() );
- float* aColor = myPickingSettings->GetColor();
+ vtkFloatingPointType* aColor = myPickingSettings->GetColor();
mySelectionColorButton->setPaletteBackgroundColor( QColor( ( int )( aColor[0] * 255.0 ),
( int )( aColor[1] * 255.0 ),
( int )( aColor[2] * 255.0 ) ) );
myPickingSettings->SetDisplayParentMesh( myDisplayParentMeshCheckBox->isChecked() );
QColor aButtonColor = mySelectionColorButton->paletteBackgroundColor();
- float aColor[3];
+ vtkFloatingPointType aColor[3];
aColor[0] = aButtonColor.red() / 255.0;
aColor[1] = aButtonColor.green() / 255.0;
aColor[2] = aButtonColor.blue() / 255.0;
myEventCallbackCommand.GetPointer(),
myPriority);
- SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
-
setCaption( tr( "SEGMENTATION_CURSOR_DLG_TITLE" ) );
setSizeGripEnabled(TRUE);
myRadiusGroup->hide();
VISU_PlanesWidget *pPlanesWidget=myWidgetCtrl->GetPlanesWidget();
- float origin[3];
+ vtkFloatingPointType origin[3];
pPlanesWidget->GetOrigin( origin );
myXOriginSpinBox->setValue( origin[0] );
myYOriginSpinBox->setValue( origin[1] );
myZOriginSpinBox->setValue( origin[2] );
- float normal[3];
+ vtkFloatingPointType normal[3];
pPlanesWidget->GetNormal( normal );
myDXDirectionSpinBox->setValue( normal[0] );
myDYDirectionSpinBox->setValue( normal[1] );
myRadiusGroup->show();
VISU_SphereWidget *pSphereWidget=myWidgetCtrl->GetSphereWidget();
- float origin[3], aRadius;
+ vtkFloatingPointType origin[3], aRadius;
pSphereWidget->GetCenter(origin);
myXOriginSpinBox->setValue( origin[0] );
myYOriginSpinBox->setValue( origin[1] );
void VVTK_SegmentationCursorDlg::UpdateInsideGaussPoints()
{
int aPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
- float aClamp = 200.0;
+ vtkFloatingPointType aClamp = 200.0;
QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
- float anAlphaThreshold = 0.1;
+ vtkFloatingPointType anAlphaThreshold = 0.1;
int aResolution = 8;
int aMinSize = 3;
int aMaxSize = 33;
int aMagnification = 100;
- float anIncrement = 2.0;
+ vtkFloatingPointType anIncrement = 2.0;
if( !myInsideCursorSettings->GetInitial() )
{
void VVTK_SegmentationCursorDlg::UpdateOutsideGaussPoints()
{
- float aClamp = 256.0;
+ vtkFloatingPointType aClamp = 256.0;
int aPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
- float anAlphaThreshold = 0.1;
+ vtkFloatingPointType anAlphaThreshold = 0.1;
int aResolution = 8;
int aSize = 25;
bool aUniform = false;
myOutsideSizeBox->setOutsideSize( myOutsideCursorSettings->GetSize() );
myOutsideSizeBox->setUniform( myOutsideCursorSettings->GetUniform() );
- float* aColor = myOutsideCursorSettings->GetColor();
+ vtkFloatingPointType* aColor = myOutsideCursorSettings->GetColor();
myOutsideSizeBox->setColor( QColor( ( int )( aColor[0] * 255.0 ),
( int )( aColor[1] * 255.0 ),
( int )( aColor[2] * 255.0 ) ) );
if( myIsPlaneSegmentation )
{
VISU_PlanesWidget *pPlanesWidget=myWidgetCtrl->GetPlanesWidget();
- float origin[3];
+ vtkFloatingPointType origin[3];
origin[0] = myXOriginSpinBox->value();
origin[1] = myYOriginSpinBox->value();
origin[2] = myZOriginSpinBox->value();
pPlanesWidget->SetOrigin( origin );
- float normal[3];
+ vtkFloatingPointType normal[3];
normal[0] = myDXDirectionSpinBox->value();
normal[1] = myDYDirectionSpinBox->value();
normal[2] = myDZDirectionSpinBox->value();
else
{
VISU_SphereWidget *pSphereWidget=myWidgetCtrl->GetSphereWidget();
- float origin[3], aRadius;
+ vtkFloatingPointType origin[3], aRadius;
origin[0] = myXOriginSpinBox->value();
origin[1] = myYOriginSpinBox->value();
origin[2] = myZOriginSpinBox->value();
myOutsideCursorSettings->SetUniform( myOutsideSizeBox->getUniform() );
QColor aButtonColor = myOutsideSizeBox->getColor();
- float aColor[3];
+ vtkFloatingPointType aColor[3];
aColor[0] = aButtonColor.red() / 255.0;
aColor[1] = aButtonColor.green() / 255.0;
aColor[2] = aButtonColor.blue() / 255.0;
VVTK_SizeBox::VVTK_SizeBox( QWidget* parent ) :
QVBox( parent )
{
- SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
-
layout()->setSpacing( 0 );
layout()->setMargin( 0 );