Commit 57daf0bc authored by Ken Martin's avatar Ken Martin

Some more features and some cleanup reorg.

parent 44e33c4a
......@@ -19,6 +19,7 @@
//-----------------------------------------------------------------------------
vtkAbstractObjectFactoryNewMacro(vtkPointGaussianMapper)
vtkCxxSetObjectMacro(vtkPointGaussianMapper, ScaleFunction, vtkPiecewiseFunction);
vtkCxxSetObjectMacro(vtkPointGaussianMapper, ScalarOpacityFunction, vtkPiecewiseFunction);
//-----------------------------------------------------------------------------
......@@ -27,10 +28,15 @@ vtkPointGaussianMapper::vtkPointGaussianMapper()
this->ScaleArray = 0;
this->OpacityArray = 0;
this->SplatShaderCode = 0;
this->ScaleFunction = 0;
this->ScaleTableSize = 1024;
this->ScalarOpacityFunction = 0;
this->DefaultRadius = 1.0;
this->Emissive = 1;
this->OpacityTableSize = 1024;
this->ScaleFactor = 1.0;
this->Emissive = 1;
}
//-----------------------------------------------------------------------------
......@@ -40,6 +46,7 @@ vtkPointGaussianMapper::~vtkPointGaussianMapper()
this->SetOpacityArray(0);
this->SetSplatShaderCode(0);
this->SetScalarOpacityFunction(0);
this->SetScaleFunction(0);
}
//-----------------------------------------------------------------------------
......@@ -50,7 +57,8 @@ void vtkPointGaussianMapper::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "Scale Array: " << (this->ScaleArray ? this->ScaleArray : "(none)") << "\n";
os << indent << "Opacity Array: " << (this->OpacityArray ? this->OpacityArray : "(none)") << "\n";
os << indent << "SplatShaderCode: " << (this->SplatShaderCode ? this->SplatShaderCode : "(none)") << "\n";
os << indent << "Default Radius: " << this->DefaultRadius << "\n";
os << indent << "ScaleFactor: " << this->ScaleFactor << "\n";
os << indent << "Emissive: " << this->Emissive << "\n";
os << indent << "OpacityTableSize: " << this->OpacityTableSize << "\n";
os << indent << "ScaleTableSize: " << this->ScaleTableSize << "\n";
}
......@@ -32,18 +32,32 @@ public:
vtkTypeMacro(vtkPointGaussianMapper, vtkPolyDataMapper)
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set/Get the optional scale transfer function. This is only
// used when a ScaleArray is also specified.
void SetScaleFunction(vtkPiecewiseFunction *);
vtkGetObjectMacro(ScaleFunction,vtkPiecewiseFunction);
// Description:
// The size of the table used in computing scale, used when
// converting a vtkPiecewiseFunction to a table
vtkSetMacro(ScaleTableSize, int);
vtkGetMacro(ScaleTableSize, int);
// Description:
// Convenience method to set the array to scale with.
vtkSetStringMacro(ScaleArray);
vtkGetStringMacro(ScaleArray);
// Description:
// Set the default radius of the point gaussians. This is used if the
// array to scale with has not been set or is set to NULL. If there
// is no scale array and the default radius is set to zero then
// the splats wil be rendered as simple points requiring less memory.
vtkSetMacro(DefaultRadius,double);
vtkGetMacro(DefaultRadius,double);
// Set the default scale factor of the point gaussians. This
// defaults to 1.0. All radius computations will be scaled by the factor
// including the ScaleArray. If a vtkPiecewideFunction is used the
// scaling happens prior to the function lookup.
// A scale factor of 0.0 indicates that the splats should be rendered
// as simple points.
vtkSetMacro(ScaleFactor,double);
vtkGetMacro(ScaleFactor,double);
// Description:
// Treat the points/splats as emissive light sources. The default is true.
......@@ -88,11 +102,14 @@ protected:
char *OpacityArray;
char *SplatShaderCode;
vtkPiecewiseFunction *ScaleFunction;
int ScaleTableSize;
vtkPiecewiseFunction *ScalarOpacityFunction;
int OpacityTableSize;
double DefaultRadius;
double ScaleFactor;
int Emissive;
int OpacityTableSize;
private:
vtkPointGaussianMapper(const vtkPointGaussianMapper&); // Not implemented.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment