return myMapper.GetPointer();
}
+int
+VISU_GaussPtsDeviceActor
+::GetPickable()
+{
+ if(Superclass::GetPickable()){
+ if(vtkMapper* aMapper = GetMapper()){
+ if(vtkDataSet* aDataSet= aMapper->GetInput()){
+ aDataSet->Update();
+ return aDataSet->GetNumberOfCells() > 0;
+ }
+ }
+ }
+
+ return false;
+}
+
//----------------------------------------------------------------------------
void
}
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);
//