return myAverageCellSize*myRelativeMaxSize;
}
+//----------------------------------------------------------------------------
+void
+VISU_GaussPointsPL
+::SetAlphaThreshold(float theAlphaThreshold)
+{
+ myPSMapper->SetPointSpriteAlphaThreshold( theAlphaThreshold );
+
+ Modified();
+}
+
+//----------------------------------------------------------------------------
+float
+VISU_GaussPointsPL
+::GetAlphaThreshold()
+{
+ return myPSMapper->GetPointSpriteAlphaThreshold();
+}
+
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
this->OpenGLLibrary = 0;
#endif
- this->AlphaThreshold = 0.1;
-
this->PointSpriteClamp = 100.0;
this->PointSpriteSize = 0.0;
this->PointSpriteMinSize = 15.0;
this->PointSpriteMaxSize = 50.0;
this->PointSpriteMagnification = 1.0;
+ this->PointSpriteAlphaThreshold = 0.1;
this->PointSpriteTexture = 0;
this->IsUsingOpenGLMapper = false;
}
this->SetPointSpriteMagnification( m->GetPointSpriteMagnification() );
this->SetImageData( m->GetImageData() );
+ this->SetPointSpriteAlphaThreshold( m->GetPointSpriteAlphaThreshold() );
}
MAPPER_SUPERCLASS::ShallowCopy(mapper);
case VISU_OpenGLPointSpriteMapper::Accumulate:
{
glDisable(GL_DEPTH_TEST);
+
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
- glAlphaFunc( GL_GREATER, this->AlphaThreshold );
+
+ glEnable( GL_ALPHA_TEST );
+ glAlphaFunc( GL_GREATER, this->PointSpriteAlphaThreshold );
break;
}
{
glDepthFunc( GL_LEQUAL );
glEnable( GL_DEPTH_TEST );
+
glDisable( GL_BLEND );
break;
}
void SetPointSpriteMaxSize( float );
void SetPointSpriteMagnification( float );
+ vtkGetMacro(PointSpriteAlphaThreshold, float);
+ vtkSetMacro(PointSpriteAlphaThreshold, float);
+
void SetImageData(vtkImageData* theImageData);
vtkImageData* GetImageData();
void* OpenGLLibrary;
#endif
- float AlphaThreshold;
-
float PointSpriteClamp;
float PointSpriteSize;
float PointSpriteMinSize;
float PointSpriteMagnification;
GLuint PointSpriteTexture;
+ float PointSpriteAlphaThreshold;
-
vtkSmartPointer<vtkImageData> ImageData;
bool IsUsingOpenGLMapper;