Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrew Bauer
VTK
Commits
f6277674
Commit
f6277674
authored
Sep 12, 1994
by
Will Schroeder
Browse files
ENH: Changed meory model.
parent
6c315de0
Changes
14
Hide whitespace changes
Inline
Side-by-side
include/AppendF.hh
View file @
f6277674
...
...
@@ -37,8 +37,10 @@ public:
char
*
GetClassName
()
{
return
"vlAppendFilter"
;};
void
PrintSelf
(
ostream
&
os
,
vlIndent
indent
);
void
AddInput
(
vlDataSet
*
);
void
RemoveInput
(
vlDataSet
*
);
void
AddInput
(
vlDataSet
*
in
);
void
AddInput
(
vlDataSet
&
in
)
{
this
->
AddInput
(
&
in
);};
void
RemoveInput
(
vlDataSet
*
in
);
void
RemoveInput
(
vlDataSet
&
in
)
{
this
->
RemoveInput
(
&
in
);};
vlDataSetCollection
*
GetInput
()
{
return
&
(
this
->
Input
);};
// filter interface
...
...
include/AppendP.hh
View file @
f6277674
...
...
@@ -38,7 +38,9 @@ public:
void
PrintSelf
(
ostream
&
os
,
vlIndent
indent
);
void
AddInput
(
vlPolyData
*
);
void
AddInput
(
vlPolyData
&
in
)
{
this
->
AddInput
(
&
in
);};
void
RemoveInput
(
vlPolyData
*
);
void
RemoveInput
(
vlPolyData
&
in
)
{
this
->
RemoveInput
(
&
in
);};
vlPolyDataCollection
*
GetInput
()
{
return
&
(
this
->
Input
);};
// filter interface
...
...
include/BoolSPts.hh
View file @
f6277674
...
...
@@ -39,8 +39,10 @@ public:
char
*
GetClassName
()
{
return
"vlBooleanStructuredPoints"
;};
void
PrintSelf
(
ostream
&
os
,
vlIndent
indent
);
void
AddInput
(
vlStructuredPoints
*
);
void
RemoveInput
(
vlStructuredPoints
*
);
void
AddInput
(
vlStructuredPoints
*
in
);
void
AddInput
(
vlStructuredPoints
&
in
)
{
this
->
AddInput
(
&
in
);};
void
RemoveInput
(
vlStructuredPoints
*
in
);
void
RemoveInput
(
vlStructuredPoints
&
in
)
{
this
->
RemoveInput
(
&
in
);};
vlStructuredPointsCollection
*
GetInput
()
{
return
&
(
this
->
Input
);};
// filter interface
...
...
include/CleanP.hh
View file @
f6277674
...
...
@@ -42,18 +42,21 @@ public:
vlSetClampMacro
(
Tolerance
,
float
,
0.0
,
1.0
);
vlGetMacro
(
Tolerance
,
float
);
// Description:
// Specify a spatial locator for speeding the search process. By
// default an instance of vlLocator is used.
vlSetObjectMacro
(
Locator
,
vlLocator
);
void
SetLocator
(
vlLocator
*
locator
);
void
SetLocator
(
vlLocator
&
locator
)
{
this
->
SetLocator
(
&
locator
);};
vlGetObjectMacro
(
Locator
,
vlLocator
);
// Description:
// Create default locator. Used to create one when none is specified.
virtual
void
CreateDefaultLocator
();
protected:
// Usual data generation method
void
Execute
();
float
Tolerance
;
vlLocator
*
Locator
;
int
SelfCreatedLocator
;
};
#endif
...
...
src/AppendF.cc
View file @
f6277674
...
...
@@ -22,13 +22,6 @@ vlAppendFilter::vlAppendFilter()
vlAppendFilter
::~
vlAppendFilter
()
{
vlDataSet
*
ds
;
for
(
int
i
=
0
;
i
<
this
->
Input
.
GetNumberOfItems
();
i
++
)
{
ds
=
this
->
Input
.
GetItem
(
i
+
1
);
ds
->
UnRegister
(
this
);
}
}
// Description:
...
...
@@ -38,7 +31,6 @@ void vlAppendFilter::AddInput(vlDataSet *ds)
if
(
!
this
->
Input
.
IsItemPresent
(
ds
)
)
{
this
->
Modified
();
ds
->
Register
(
this
);
this
->
Input
.
AddItem
(
ds
);
}
}
...
...
@@ -50,7 +42,6 @@ void vlAppendFilter::RemoveInput(vlDataSet *ds)
if
(
this
->
Input
.
IsItemPresent
(
ds
)
)
{
this
->
Modified
();
ds
->
UnRegister
(
this
);
this
->
Input
.
RemoveItem
(
ds
);
}
}
...
...
src/AppendP.cc
View file @
f6277674
...
...
@@ -22,13 +22,6 @@ vlAppendPolyData::vlAppendPolyData()
vlAppendPolyData
::~
vlAppendPolyData
()
{
vlDataSet
*
ds
;
for
(
int
i
=
0
;
i
<
this
->
Input
.
GetNumberOfItems
();
i
++
)
{
ds
=
this
->
Input
.
GetItem
(
i
+
1
);
ds
->
UnRegister
(
this
);
}
}
// Description:
...
...
@@ -38,7 +31,6 @@ void vlAppendPolyData::AddInput(vlPolyData *ds)
if
(
!
this
->
Input
.
IsItemPresent
(
ds
)
)
{
this
->
Modified
();
ds
->
Register
(
this
);
this
->
Input
.
AddItem
(
ds
);
}
}
...
...
@@ -50,7 +42,6 @@ void vlAppendPolyData::RemoveInput(vlPolyData *ds)
if
(
this
->
Input
.
IsItemPresent
(
ds
)
)
{
this
->
Modified
();
ds
->
UnRegister
(
this
);
this
->
Input
.
RemoveItem
(
ds
);
}
}
...
...
src/BoolSPts.cc
View file @
f6277674
...
...
@@ -37,13 +37,6 @@ vlBooleanStructuredPoints::vlBooleanStructuredPoints()
vlBooleanStructuredPoints
::~
vlBooleanStructuredPoints
()
{
vlStructuredPoints
*
ds
;
for
(
int
i
=
0
;
i
<
this
->
Input
.
GetNumberOfItems
();
i
++
)
{
ds
=
this
->
Input
.
GetItem
(
i
+
1
);
ds
->
UnRegister
(
this
);
}
}
// Description:
...
...
@@ -53,7 +46,6 @@ void vlBooleanStructuredPoints::AddInput(vlStructuredPoints *sp)
if
(
!
this
->
Input
.
IsItemPresent
(
sp
)
)
{
this
->
Modified
();
sp
->
Register
(
this
);
this
->
Input
.
AddItem
(
sp
);
}
}
...
...
@@ -65,7 +57,6 @@ void vlBooleanStructuredPoints::RemoveInput(vlStructuredPoints *sp)
if
(
this
->
Input
.
IsItemPresent
(
sp
)
)
{
this
->
Modified
();
sp
->
UnRegister
(
this
);
this
->
Input
.
RemoveItem
(
sp
);
}
}
...
...
src/CleanP.cc
View file @
f6277674
...
...
@@ -21,11 +21,13 @@ vlCleanPolyData::vlCleanPolyData()
{
this
->
Tolerance
=
0.0
;
this
->
Locator
=
NULL
;
this
->
SelfCreatedLocator
=
0
;
}
vlCleanPolyData
::~
vlCleanPolyData
()
{
if
(
this
->
Locator
)
this
->
Locator
->
UnRegister
(
this
);
if
(
this
->
SelfCreatedLocator
&&
this
->
Locator
!=
NULL
)
delete
this
->
Locator
;
}
void
vlCleanPolyData
::
Execute
()
...
...
@@ -57,11 +59,7 @@ void vlCleanPolyData::Execute()
pd
=
this
->
Input
->
GetPointData
();
this
->
PointData
.
CopyAllocate
(
pd
);
if
(
this
->
Locator
==
NULL
)
{
this
->
Locator
=
new
vlLocator
;
this
->
Locator
->
Register
(
this
);
}
if
(
this
->
Locator
==
NULL
)
this
->
CreateDefaultLocator
();
this
->
Locator
->
SetPoints
(
inPts
);
...
...
@@ -186,6 +184,27 @@ void vlCleanPolyData::Execute()
}
// Description:
// Specify a spatial locator for speeding the search process. By
// default an instance of vlLocator is used.
void
vlCleanPolyData
::
SetLocator
(
vlLocator
*
locator
)
{
if
(
this
->
Locator
!=
locator
)
{
if
(
this
->
SelfCreatedLocator
)
delete
this
->
Locator
;
this
->
SelfCreatedLocator
=
0
;
this
->
Locator
=
locator
;
this
->
Modified
();
}
}
void
vlCleanPolyData
::
CreateDefaultLocator
()
{
if
(
this
->
SelfCreatedLocator
)
delete
this
->
Locator
;
this
->
Locator
=
new
vlLocator
;
this
->
SelfCreatedLocator
=
1
;
}
void
vlCleanPolyData
::
PrintSelf
(
ostream
&
os
,
vlIndent
indent
)
{
if
(
this
->
ShouldIPrint
(
vlCleanPolyData
::
GetClassName
()))
...
...
src/Cutter.cc
View file @
f6277674
...
...
@@ -22,12 +22,10 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
vlCutter
::
vlCutter
(
vlImplicitFunction
*
cf
)
{
this
->
CutFunction
=
cf
;
if
(
cf
)
this
->
CutFunction
->
Register
(
this
);
}
vlCutter
::~
vlCutter
()
{
if
(
this
->
CutFunction
)
this
->
CutFunction
->
UnRegister
(
this
);
}
// Description:
...
...
src/DS2DSF.cc
View file @
f6277674
...
...
@@ -20,12 +20,11 @@ vlDataSetToDataSetFilter::vlDataSetToDataSetFilter()
{
// prevents dangling reference to DataSet
this
->
DataSet
=
new
vlPolyData
;
this
->
DataSet
->
Register
(
this
);
}
vlDataSetToDataSetFilter
::~
vlDataSetToDataSetFilter
()
{
this
->
DataSet
->
UnRegister
(
this
)
;
delete
this
->
DataSet
;
}
void
vlDataSetToDataSetFilter
::
Update
()
...
...
@@ -41,10 +40,9 @@ void vlDataSetToDataSetFilter::Initialize()
{
if
(
this
->
Input
)
{
this
->
DataSet
->
UnRegister
(
this
)
;
delete
this
->
DataSet
;
// copies input geometry to internal data set
this
->
DataSet
=
this
->
Input
->
MakeObject
();
this
->
DataSet
->
Register
(
this
);
}
else
{
...
...
src/Glyph3D.cc
View file @
f6277674
...
...
@@ -37,10 +37,6 @@ vlGlyph3D::vlGlyph3D()
vlGlyph3D
::~
vlGlyph3D
()
{
if
(
this
->
Source
)
{
this
->
Source
->
UnRegister
(
this
);
}
}
void
vlGlyph3D
::
PrintSelf
(
ostream
&
os
,
vlIndent
indent
)
...
...
src/MergeF.cc
View file @
f6277674
...
...
@@ -22,17 +22,10 @@ vlMergeFilter::vlMergeFilter()
{
// prevents dangling reference to DataSet
this
->
Geometry
=
new
vlPolyData
;
this
->
Geometry
->
Register
(
this
);
}
vlMergeFilter
::~
vlMergeFilter
()
{
this
->
Geometry
->
UnRegister
(
this
);
if
(
this
->
Scalars
)
this
->
Scalars
->
UnRegister
(
this
);
if
(
this
->
Vectors
)
this
->
Vectors
->
UnRegister
(
this
);
if
(
this
->
Normals
)
this
->
Normals
->
UnRegister
(
this
);
if
(
this
->
TCoords
)
this
->
TCoords
->
UnRegister
(
this
);
}
void
vlMergeFilter
::
Update
()
...
...
@@ -48,10 +41,9 @@ void vlMergeFilter::Initialize()
{
if
(
this
->
Geometry
)
{
this
->
Geometry
->
UnRegister
(
this
)
;
delete
this
->
Geometry
;
// copies input geometry to internal data set
this
->
Geometry
=
this
->
Geometry
->
MakeObject
();
this
->
Geometry
->
Register
(
this
);
}
else
{
...
...
src/ProbeF.cc
View file @
f6277674
...
...
@@ -63,10 +63,9 @@ void vlProbeFilter::Initialize()
{
if
(
this
->
Source
)
{
if
(
this
->
DataSet
)
this
->
DataSet
->
UnRegister
(
this
)
;
if
(
this
->
DataSet
)
delete
this
->
DataSet
;
// copies SOURCE geometry to internal data set
this
->
DataSet
=
this
->
Source
->
MakeObject
();
this
->
DataSet
->
Register
(
this
);
}
else
{
...
...
src/PtS2PtSF.cc
View file @
f6277674
...
...
@@ -20,19 +20,17 @@ vlPointSetToPointSetFilter::vlPointSetToPointSetFilter()
{
// prevents dangling reference to PointSet
this
->
PointSet
=
new
vlPolyData
;
this
->
PointSet
->
Register
(
this
);
}
vlPointSetToPointSetFilter
::~
vlPointSetToPointSetFilter
()
{
this
->
PointSet
->
UnRegister
(
this
)
;
delete
this
->
PointSet
;
}
vlDataSet
*
vlPointSetToPointSetFilter
::
MakeObject
()
{
vlPointSetToPointSetFilter
*
o
=
new
vlPointSetToPointSetFilter
();
o
->
PointSet
=
this
->
PointSet
;
o
->
PointSet
->
Register
(
o
);
o
->
SetPoints
(
this
->
GetPoints
());
return
o
;
}
...
...
@@ -47,10 +45,9 @@ void vlPointSetToPointSetFilter::Initialize()
if
(
this
->
Input
!=
NULL
)
{
vlDataSet
*
ds
=
this
->
Input
->
MakeObject
();
this
->
PointSet
->
UnRegister
(
this
)
;
delete
this
->
PointSet
;
// copies input geometry to internal data set
this
->
PointSet
=
ds
;
this
->
PointSet
->
Register
(
this
);
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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