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
e4e6c028
Commit
e4e6c028
authored
Nov 12, 2002
by
Brad King
💬
Browse files
ENH: vtkCell::MakeObject() is now deprecated.
parent
11c88362
Changes
47
Hide whitespace changes
Inline
Side-by-side
Common/Testing/Cxx/otherEmptyCell.cxx
View file @
e4e6c028
...
...
@@ -30,7 +30,8 @@
void
TestOEC
(
ostream
&
strm
)
{
vtkEmptyCell
*
cell
=
vtkEmptyCell
::
New
();
vtkCell
*
cell2
=
cell
->
MakeObject
();
vtkCell
*
cell2
=
cell
->
NewInstance
();
cell2
->
DeepCopy
(
cell
);
vtkIdList
*
ids
=
vtkIdList
::
New
();
vtkPoints
*
pts
=
vtkPoints
::
New
();
float
v
=
0.0
;
...
...
Common/Testing/Cxx/quadraticEvaluation.cxx
View file @
e4e6c028
...
...
@@ -47,21 +47,21 @@ int TestQE(ostream& strm)
int
subId
;
//-----------------------------------------------------------
strm
<<
"Test instantiation New() and
MakeObject
() Start"
<<
endl
;
strm
<<
"Test instantiation New() and
NewInstance
() Start"
<<
endl
;
vtkQuadraticEdge
*
edge
=
vtkQuadraticEdge
::
New
();
vtkQuadraticEdge
*
edge2
=
static_cast
<
vtkQuadraticEdge
*>
(
edge
->
MakeObject
()
);
vtkQuadraticEdge
*
edge2
=
edge
->
NewInstance
(
);
vtkQuadraticTriangle
*
tri
=
vtkQuadraticTriangle
::
New
();
vtkQuadraticTriangle
*
tri2
=
static_cast
<
vtkQuadraticTriangle
*>
(
tri
->
MakeObject
()
);
vtkQuadraticTriangle
*
tri2
=
tri
->
NewInstance
(
);
vtkQuadraticQuad
*
quad
=
vtkQuadraticQuad
::
New
();
vtkQuadraticQuad
*
quad2
=
static_cast
<
vtkQuadraticQuad
*>
(
quad
->
MakeObject
()
);
vtkQuadraticQuad
*
quad2
=
quad
->
NewInstance
(
);
vtkQuadraticTetra
*
tetra
=
vtkQuadraticTetra
::
New
();
vtkQuadraticTetra
*
tetra2
=
static_cast
<
vtkQuadraticTetra
*>
(
tetra
->
MakeObject
()
);
vtkQuadraticTetra
*
tetra2
=
tetra
->
NewInstance
(
);
vtkQuadraticHexahedron
*
hex
=
vtkQuadraticHexahedron
::
New
();
vtkQuadraticHexahedron
*
hex2
=
static_cast
<
vtkQuadraticHexahedron
*>
(
hex
->
MakeObject
()
);
vtkQuadraticHexahedron
*
hex2
=
hex
->
NewInstance
(
);
edge2
->
Delete
();
tri2
->
Delete
();
...
...
@@ -69,7 +69,7 @@ int TestQE(ostream& strm)
tetra2
->
Delete
();
hex2
->
Delete
();
strm
<<
"Test instantiation New() and
MakeObject
() End"
<<
endl
;
strm
<<
"Test instantiation New() and
NewInstance
() End"
<<
endl
;
//-------------------------------------------------------------
...
...
Common/vtkCell.cxx
View file @
e4e6c028
...
...
@@ -18,7 +18,7 @@
#include
"vtkCell.h"
#include
"vtkMarchingSquaresCases.h"
vtkCxxRevisionMacro
(
vtkCell
,
"1.5
3
"
);
vtkCxxRevisionMacro
(
vtkCell
,
"1.5
4
"
);
// Construct cell.
vtkCell
::
vtkCell
()
...
...
@@ -306,3 +306,14 @@ vtkMarchingSquaresLineCases* vtkMarchingSquaresLineCases::GetCases()
{
return
VTK_MARCHING_SQUARES_LINECASES
;
}
//----------------------------------------------------------------------------
#ifndef VTK_REMOVE_LEGACY_CODE
vtkCell
*
vtkCell
::
MakeObject
()
{
VTK_LEGACY_METHOD
(
MakeObject
,
"4.2"
);
vtkCell
*
c
=
this
->
NewInstance
();
c
->
DeepCopy
(
this
);
return
c
;
}
#endif
Common/vtkCell.h
View file @
e4e6c028
...
...
@@ -63,10 +63,11 @@ public:
// coordinates specified.
void
Initialize
(
int
npts
,
vtkIdType
*
pts
,
vtkPoints
*
p
);
#ifndef VTK_REMOVE_LEGACY_CODE
// Description:
//
Create concrete copy of this cell. Initially, the copy is made by
// performing a ShallowCopy() operation.
virtual
vtkCell
*
MakeObject
()
=
0
;
//
For legacy compatibility. Do not use.
virtual
vtkCell
*
MakeObject
();
#endif
// Description:
// Copy this cell by reference counting the internal data structures.
...
...
Common/vtkConvexPointSet.cxx
View file @
e4e6c028
...
...
@@ -25,7 +25,7 @@
#include
"vtkPointData.h"
#include
"vtkObjectFactory.h"
vtkCxxRevisionMacro
(
vtkConvexPointSet
,
"1.1
3
"
);
vtkCxxRevisionMacro
(
vtkConvexPointSet
,
"1.1
4
"
);
vtkStandardNewMacro
(
vtkConvexPointSet
);
// Construct the hexahedron with eight points.
...
...
@@ -53,13 +53,6 @@ vtkConvexPointSet::~vtkConvexPointSet()
this
->
Triangle
->
Delete
();
}
vtkCell
*
vtkConvexPointSet
::
MakeObject
()
{
vtkCell
*
cell
=
vtkConvexPointSet
::
New
();
cell
->
DeepCopy
(
this
);
return
cell
;
}
// Should be called by GetCell() prior to any other method invocation
void
vtkConvexPointSet
::
Initialize
()
{
...
...
Common/vtkConvexPointSet.h
View file @
e4e6c028
...
...
@@ -51,7 +51,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
virtual
vtkCell
*
MakeObject
();
virtual
int
GetCellType
()
{
return
VTK_CONVEX_POINT_SET
;}
// Description:
...
...
Common/vtkEmptyCell.h
View file @
e4e6c028
...
...
@@ -33,7 +33,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
vtkCell
*
MakeObject
()
{
return
vtkEmptyCell
::
New
();};
int
GetCellType
()
{
return
VTK_EMPTY_CELL
;};
int
GetCellDimension
()
{
return
0
;};
int
GetNumberOfEdges
()
{
return
0
;};
...
...
Common/vtkGenericCell.cxx
View file @
e4e6c028
...
...
@@ -39,7 +39,7 @@
#include
"vtkConvexPointSet.h"
#include
"vtkObjectFactory.h"
vtkCxxRevisionMacro
(
vtkGenericCell
,
"1.1
6
"
);
vtkCxxRevisionMacro
(
vtkGenericCell
,
"1.1
7
"
);
vtkStandardNewMacro
(
vtkGenericCell
);
// Construct cell.
...
...
@@ -53,13 +53,6 @@ vtkGenericCell::~vtkGenericCell()
this
->
Cell
->
Delete
();
}
// The following methods dereference vtkCell virtual functions to allow
// vtkCell to act like a concrete object.
vtkCell
*
vtkGenericCell
::
MakeObject
()
{
return
this
->
Cell
->
MakeObject
();
}
void
vtkGenericCell
::
ShallowCopy
(
vtkCell
*
c
)
{
this
->
Cell
->
ShallowCopy
(
c
);
...
...
Common/vtkGenericCell.h
View file @
e4e6c028
...
...
@@ -43,7 +43,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
vtkCell
*
MakeObject
();
void
ShallowCopy
(
vtkCell
*
c
);
void
DeepCopy
(
vtkCell
*
c
);
int
GetCellType
();
...
...
Common/vtkHexahedron.cxx
View file @
e4e6c028
...
...
@@ -26,7 +26,7 @@
#include
"vtkPointLocator.h"
#include
"vtkQuad.h"
vtkCxxRevisionMacro
(
vtkHexahedron
,
"1.8
3
"
);
vtkCxxRevisionMacro
(
vtkHexahedron
,
"1.8
4
"
);
vtkStandardNewMacro
(
vtkHexahedron
);
static
const
float
VTK_DIVERGED
=
1.e6
;
...
...
@@ -57,13 +57,6 @@ vtkHexahedron::~vtkHexahedron()
this
->
Quad
->
Delete
();
}
vtkCell
*
vtkHexahedron
::
MakeObject
()
{
vtkCell
*
cell
=
vtkHexahedron
::
New
();
cell
->
DeepCopy
(
this
);
return
cell
;
}
// Method to calculate parametric coordinates in an eight noded
// linear hexahedron element from global coordinates.
//
...
...
Common/vtkHexahedron.h
View file @
e4e6c028
...
...
@@ -46,7 +46,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
vtkCell
*
MakeObject
();
int
GetCellType
()
{
return
VTK_HEXAHEDRON
;}
int
GetNumberOfEdges
()
{
return
12
;}
int
GetNumberOfFaces
()
{
return
6
;}
...
...
Common/vtkLine.cxx
View file @
e4e6c028
...
...
@@ -24,7 +24,7 @@
#include
"vtkPointData.h"
#include
"vtkPointLocator.h"
vtkCxxRevisionMacro
(
vtkLine
,
"1.7
6
"
);
vtkCxxRevisionMacro
(
vtkLine
,
"1.7
7
"
);
vtkStandardNewMacro
(
vtkLine
);
// Construct the line with two points.
...
...
@@ -44,13 +44,6 @@ vtkLine::vtkLine()
}
}
vtkCell
*
vtkLine
::
MakeObject
()
{
vtkCell
*
cell
=
vtkLine
::
New
();
cell
->
DeepCopy
(
this
);
return
cell
;
}
static
const
int
VTK_NO_INTERSECTION
=
0
;
static
const
int
VTK_YES_INTERSECTION
=
2
;
static
const
int
VTK_ON_LINE
=
3
;
...
...
Common/vtkLine.h
View file @
e4e6c028
...
...
@@ -32,7 +32,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
vtkCell
*
MakeObject
();
int
GetCellType
()
{
return
VTK_LINE
;};
int
GetCellDimension
()
{
return
1
;};
int
GetNumberOfEdges
()
{
return
0
;};
...
...
Common/vtkPixel.cxx
View file @
e4e6c028
...
...
@@ -28,7 +28,7 @@
#include
"vtkPointData.h"
#include
"vtkCellData.h"
vtkCxxRevisionMacro
(
vtkPixel
,
"1.7
4
"
);
vtkCxxRevisionMacro
(
vtkPixel
,
"1.7
5
"
);
vtkStandardNewMacro
(
vtkPixel
);
// Construct the pixel with four points.
...
...
@@ -54,13 +54,6 @@ vtkPixel::~vtkPixel()
this
->
Line
->
Delete
();
}
vtkCell
*
vtkPixel
::
MakeObject
()
{
vtkCell
*
cell
=
vtkPixel
::
New
();
cell
->
DeepCopy
(
this
);
return
cell
;
}
int
vtkPixel
::
EvaluatePosition
(
float
x
[
3
],
float
*
closestPoint
,
int
&
subId
,
float
pcoords
[
3
],
float
&
dist2
,
float
*
weights
)
...
...
Common/vtkPixel.h
View file @
e4e6c028
...
...
@@ -36,7 +36,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
vtkCell
*
MakeObject
();
int
GetCellType
()
{
return
VTK_PIXEL
;};
int
GetCellDimension
()
{
return
2
;};
int
GetNumberOfEdges
()
{
return
4
;};
...
...
Common/vtkPolyLine.cxx
View file @
e4e6c028
...
...
@@ -21,7 +21,7 @@
#include
"vtkObjectFactory.h"
#include
"vtkFloatArray.h"
vtkCxxRevisionMacro
(
vtkPolyLine
,
"1.7
2
"
);
vtkCxxRevisionMacro
(
vtkPolyLine
,
"1.7
3
"
);
vtkStandardNewMacro
(
vtkPolyLine
);
vtkPolyLine
::
vtkPolyLine
()
...
...
@@ -34,13 +34,6 @@ vtkPolyLine::~vtkPolyLine()
this
->
Line
->
Delete
();
}
vtkCell
*
vtkPolyLine
::
MakeObject
()
{
vtkCell
*
cell
=
vtkPolyLine
::
New
();
cell
->
DeepCopy
(
this
);
return
cell
;
}
// Given points and lines, compute normals to lines. These are not true
// normals, they are "orientation" normals used by classes like vtkTubeFilter
// that control the rotation around the line. The normals try to stay pointing
...
...
Common/vtkPolyLine.h
View file @
e4e6c028
...
...
@@ -43,7 +43,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
vtkCell
*
MakeObject
();
int
GetCellType
()
{
return
VTK_POLY_LINE
;};
int
GetCellDimension
()
{
return
1
;};
int
GetNumberOfEdges
()
{
return
0
;};
...
...
Common/vtkPolyVertex.cxx
View file @
e4e6c028
...
...
@@ -24,7 +24,7 @@
#include
"vtkPointData.h"
#include
"vtkCellData.h"
vtkCxxRevisionMacro
(
vtkPolyVertex
,
"1.5
8
"
);
vtkCxxRevisionMacro
(
vtkPolyVertex
,
"1.5
9
"
);
vtkStandardNewMacro
(
vtkPolyVertex
);
vtkPolyVertex
::
vtkPolyVertex
()
...
...
@@ -37,13 +37,6 @@ vtkPolyVertex::~vtkPolyVertex()
this
->
Vertex
->
Delete
();
}
vtkCell
*
vtkPolyVertex
::
MakeObject
()
{
vtkCell
*
cell
=
vtkPolyVertex
::
New
();
cell
->
DeepCopy
(
this
);
return
cell
;
}
int
vtkPolyVertex
::
EvaluatePosition
(
float
x
[
3
],
float
*
closestPoint
,
int
&
subId
,
float
pcoords
[
3
],
float
&
minDist2
,
float
*
weights
)
...
...
Common/vtkPolyVertex.h
View file @
e4e6c028
...
...
@@ -34,7 +34,6 @@ public:
// Description:
// See the vtkCell API for descriptions of these methods.
vtkCell
*
MakeObject
();
int
GetCellType
()
{
return
VTK_POLY_VERTEX
;};
int
GetCellDimension
()
{
return
0
;};
int
GetNumberOfEdges
()
{
return
0
;};
...
...
Common/vtkPolygon.cxx
View file @
e4e6c028
...
...
@@ -26,7 +26,7 @@
#include
<stdlib.h>
vtkCxxRevisionMacro
(
vtkPolygon
,
"1.9
6
"
);
vtkCxxRevisionMacro
(
vtkPolygon
,
"1.9
7
"
);
vtkStandardNewMacro
(
vtkPolygon
);
// Instantiate polygon.
...
...
@@ -50,13 +50,6 @@ vtkPolygon::~vtkPolygon()
this
->
Line
->
Delete
();
}
vtkCell
*
vtkPolygon
::
MakeObject
()
{
vtkCell
*
cell
=
vtkPolygon
::
New
();
cell
->
DeepCopy
(
this
);
return
cell
;
}
#define VTK_POLYGON_FAILURE -1
#define VTK_POLYGON_OUTSIDE 0
#define VTK_POLYGON_INSIDE 1
...
...
Prev
1
2
3
Next
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