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
Christian Butz
VTK
Commits
686e3e70
Commit
686e3e70
authored
Nov 29, 2011
by
Jeff Baumes
Committed by
Kitware Robot
Nov 29, 2011
Browse files
Merge topic 'tulip-reader-enhancements'
654cd26c
COMP: Fixing allocation of points, static allocation does not work on VS
parents
e9255e2d
654cd26c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Graphics/vtkConvexHull2D.cxx
View file @
686e3e70
...
...
@@ -101,7 +101,7 @@ void vtkConvexHull2D::CalculateConvexHull(vtkPoints* inPoints,
vtkPointsProjectedHull
*
ppHull
=
vtkPointsProjectedHull
::
New
();
ppHull
->
ShallowCopy
(
inPoints
);
int
numHullPoints
=
ppHull
->
GetSizeCCWHullZ
();
double
pts
[
2
*
numHullPoints
];
double
*
pts
=
new
double
[
2
*
numHullPoints
];
ppHull
->
GetCCWHullZ
(
pts
,
numHullPoints
);
vtkPoints
*
hullPoints
=
vtkPoints
::
New
();
...
...
@@ -111,6 +111,7 @@ void vtkConvexHull2D::CalculateConvexHull(vtkPoints* inPoints,
hullPoints
->
SetPoint
(
i
,
pts
[
2
*
i
],
pts
[
2
*
i
+
1
],
0.0
);
}
ppHull
->
Delete
();
delete
[]
pts
;
if
(
numHullPoints
<
3
)
{
...
...
@@ -295,7 +296,7 @@ int vtkConvexHull2D::RequestData(vtkInformation *vtkNotUsed(request),
if
(
this
->
Outline
)
{
vtkIdType
numOutlinePoints
=
outputHull
->
GetNumberOfPoints
();
vtkIdType
outlinePts
[
numOutlinePoints
+
1
];
vtkIdType
*
outlinePts
=
new
vtkIdType
[
numOutlinePoints
+
1
];
for
(
int
i
=
0
;
i
<
numOutlinePoints
;
++
i
)
{
outlinePts
[
i
]
=
i
;
...
...
@@ -311,6 +312,7 @@ int vtkConvexHull2D::RequestData(vtkInformation *vtkNotUsed(request),
outlinePolyData
->
SetPoints
(
outputHull
->
GetPoints
());
outlinePolyData
->
SetLines
(
outlineCells
);
outlineCells
->
Delete
();
delete
[]
outlinePts
;
// Copy outline to output
outputOutline
->
ShallowCopy
(
outlinePolyData
);
...
...
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