Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Boonthanome Nouanesengsy
VTK
Commits
57daf0bc
Commit
57daf0bc
authored
Aug 11, 2015
by
Ken Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more features and some cleanup reorg.
parent
44e33c4a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
281 additions
and
302 deletions
+281
-302
Rendering/Core/vtkPointGaussianMapper.cxx
Rendering/Core/vtkPointGaussianMapper.cxx
+11
-3
Rendering/Core/vtkPointGaussianMapper.h
Rendering/Core/vtkPointGaussianMapper.h
+25
-8
Rendering/OpenGL2/vtkOpenGLPointGaussianMapper.cxx
Rendering/OpenGL2/vtkOpenGLPointGaussianMapper.cxx
+245
-291
No files found.
Rendering/Core/vtkPointGaussianMapper.cxx
View file @
57daf0bc
...
...
@@ -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
"
;
}
Rendering/Core/vtkPointGaussianMapper.h
View file @
57daf0bc
...
...
@@ -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.
...
...
Rendering/OpenGL2/vtkOpenGLPointGaussianMapper.cxx
View file @
57daf0bc
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment