Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
93198384
Commit
93198384
authored
Nov 08, 2002
by
Dean Inglis
Browse files
FIX: SetResolution problem - fixing purify errors
parent
50cfd0c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Hybrid/vtkSplineWidget.cxx
View file @
93198384
...
...
@@ -34,7 +34,7 @@
#include
"vtkSphereSource.h"
#include
"vtkTransform.h"
vtkCxxRevisionMacro
(
vtkSplineWidget
,
"1.
3
"
);
vtkCxxRevisionMacro
(
vtkSplineWidget
,
"1.
4
"
);
vtkStandardNewMacro
(
vtkSplineWidget
);
vtkSplineWidget
::
vtkSplineWidget
()
...
...
@@ -530,6 +530,7 @@ void vtkSplineWidget::HighlightLine(int highlight)
{
if
(
highlight
)
{
this
->
ValidPick
=
1
;
this
->
LinePicker
->
GetPickPosition
(
this
->
LastPickPosition
);
this
->
LineActor
->
SetProperty
(
this
->
SelectedLineProperty
);
}
...
...
@@ -613,7 +614,7 @@ void vtkSplineWidget::OnMiddleButtonDown()
int
Y
=
this
->
Interactor
->
GetEventPosition
()[
1
];
// Okay, we can process this. Try to pick handles first;
// if no handles picked, then pick the
bounding box
.
// if no handles picked, then
try to
pick the
line
.
vtkAssemblyPath
*
path
;
this
->
Interactor
->
FindPokedRenderer
(
X
,
Y
);
this
->
HandlePicker
->
Pick
(
X
,
Y
,
0.0
,
this
->
CurrentRenderer
);
...
...
@@ -1171,10 +1172,9 @@ void vtkSplineWidget::SetResolution(int resolution)
return
;
}
this
->
Resolution
=
resolution
;
this
->
NumberOfSplinePoints
=
this
->
Resolution
+
1
;
this
->
NumberOfSplinePoints
=
resolution
+
1
;
if
(
resolution
>
this
->
Resolution
)
if
(
resolution
>
this
->
Resolution
)
//only delete when necessary
{
delete
[]
this
->
SplinePositions
;
if
(
(
this
->
SplinePositions
=
new
float
[
this
->
NumberOfSplinePoints
])
==
NULL
)
...
...
@@ -1184,6 +1184,10 @@ void vtkSplineWidget::SetResolution(int resolution)
}
}
this
->
Resolution
=
resolution
;
this
->
LinePicker
->
DeletePickList
(
this
->
LineActor
);
vtkPoints
*
points
=
this
->
LineData
->
GetPoints
();
points
->
Allocate
(
this
->
NumberOfSplinePoints
);
vtkCellArray
*
lines
=
this
->
LineData
->
GetLines
();
...
...
@@ -1207,6 +1211,7 @@ void vtkSplineWidget::SetResolution(int resolution)
this
->
LineData
->
Update
();
this
->
LineMapper
->
Update
();
this
->
LineActor
->
Modified
();
this
->
LinePicker
->
AddPickList
(
this
->
LineActor
);
}
void
vtkSplineWidget
::
GetPolyData
(
vtkPolyData
*
pd
)
...
...
Write
Preview
Supports
Markdown
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