Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VTK
VTK
Commits
2b18c8b4
Commit
2b18c8b4
authored
Jan 11, 2012
by
Kyle Lutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add QUERY type for vtkSelectionNode
Change-Id: I494ddef84e216560dc2c6d203b60ad29b3b1d4fd
parent
93b15a76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
Filtering/vtkSelectionNode.cxx
Filtering/vtkSelectionNode.cxx
+4
-0
Filtering/vtkSelectionNode.h
Filtering/vtkSelectionNode.h
+8
-1
Graphics/vtkSelectionSource.cxx
Graphics/vtkSelectionSource.cxx
+8
-0
Graphics/vtkSelectionSource.h
Graphics/vtkSelectionSource.h
+7
-0
No files found.
Filtering/vtkSelectionNode.cxx
View file @
2b18c8b4
...
...
@@ -60,6 +60,7 @@ vtkSelectionNode::vtkSelectionNode()
{
this
->
SelectionData
=
vtkDataSetAttributes
::
New
();
this
->
Properties
=
vtkInformation
::
New
();
this
->
QueryString
=
0
;
}
//----------------------------------------------------------------------------
...
...
@@ -70,6 +71,7 @@ vtkSelectionNode::~vtkSelectionNode()
{
this
->
SelectionData
->
Delete
();
}
this
->
SetQueryString
(
0
);
}
//----------------------------------------------------------------------------
...
...
@@ -189,6 +191,7 @@ void vtkSelectionNode::ShallowCopy(vtkSelectionNode* input)
this
->
Initialize
();
this
->
Properties
->
Copy
(
input
->
Properties
,
0
);
this
->
SelectionData
->
ShallowCopy
(
input
->
SelectionData
);
this
->
SetQueryString
(
input
->
GetQueryString
());
this
->
Modified
();
}
...
...
@@ -202,6 +205,7 @@ void vtkSelectionNode::DeepCopy(vtkSelectionNode* input)
this
->
Initialize
();
this
->
Properties
->
Copy
(
input
->
Properties
,
1
);
this
->
SelectionData
->
DeepCopy
(
input
->
SelectionData
);
this
->
SetQueryString
(
input
->
GetQueryString
());
this
->
Modified
();
}
...
...
Filtering/vtkSelectionNode.h
View file @
2b18c8b4
...
...
@@ -123,7 +123,8 @@ public:
FRUSTUM
,
LOCATIONS
,
THRESHOLDS
,
BLOCKS
// used to select blocks within a composite dataset.
BLOCKS
,
// used to select blocks within a composite dataset.
QUERY
};
//ETX
...
...
@@ -157,6 +158,11 @@ public:
virtual
void
SetFieldType
(
int
type
);
virtual
int
GetFieldType
();
// Description:
// Set/Get the query expression string.
vtkSetStringMacro
(
QueryString
);
vtkGetStringMacro
(
QueryString
);
// Description:
// For location selection of points, if distance is greater than this reject.
static
vtkInformationDoubleKey
*
EPSILON
();
...
...
@@ -242,6 +248,7 @@ protected:
vtkInformation
*
Properties
;
vtkDataSetAttributes
*
SelectionData
;
char
*
QueryString
;
private:
vtkSelectionNode
(
const
vtkSelectionNode
&
);
// Not implemented.
...
...
Graphics/vtkSelectionSource.cxx
View file @
2b18c8b4
...
...
@@ -69,6 +69,7 @@ vtkSelectionSource::vtkSelectionSource()
this
->
CompositeIndex
=
-
1
;
this
->
HierarchicalLevel
=
-
1
;
this
->
HierarchicalIndex
=
-
1
;
this
->
QueryString
=
0
;
}
//----------------------------------------------------------------------------
...
...
@@ -504,6 +505,13 @@ int vtkSelectionSource::RequestData(
selectionList
->
Delete
();
}
if
(
this
->
ContentType
==
vtkSelectionNode
::
QUERY
)
{
oProperties
->
Set
(
vtkSelectionNode
::
CONTENT_TYPE
(),
this
->
ContentType
);
oProperties
->
Set
(
vtkSelectionNode
::
FIELD_TYPE
(),
this
->
FieldType
);
output
->
SetQueryString
(
this
->
QueryString
);
}
oProperties
->
Set
(
vtkSelectionNode
::
CONTAINING_CELLS
(),
this
->
ContainingCells
);
...
...
Graphics/vtkSelectionSource.h
View file @
2b18c8b4
...
...
@@ -122,6 +122,12 @@ public:
vtkGetMacro
(
HierarchicalLevel
,
int
);
vtkSetMacro
(
HierarchicalIndex
,
int
);
vtkGetMacro
(
HierarchicalIndex
,
int
);
// Description:
// Set/Get the query expression string.
vtkSetStringMacro
(
QueryString
);
vtkGetStringMacro
(
QueryString
);
protected:
vtkSelectionSource
();
~
vtkSelectionSource
();
...
...
@@ -146,6 +152,7 @@ protected:
int
HierarchicalIndex
;
char
*
ArrayName
;
int
ArrayComponent
;
char
*
QueryString
;
private:
vtkSelectionSource
(
const
vtkSelectionSource
&
);
// Not implemented.
...
...
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