7 #include "imstkVertexPicker.h" 8 #include "imstkImplicitGeometry.h" 9 #include "imstkPointSet.h" 10 #include "imstkVecDataArray.h" 14 VertexPicker::VertexPicker()
16 setRequiredInputType<PointSet>(0);
25 std::shared_ptr<VecDataArray<double, 3>> verticesPtr = pointSetToPick->
getVertexPositions();
27 for (
int i = 0; i < vertices.size(); i++)
29 const double signedDist = m_pickGeometry->getFunctionValue(vertices[i]);
33 if (signedDist <= 0.0)
39 m_results.push_back(data);
Base class for all geometries represented by discrete points and elements The pointsets follow a pipe...
std::shared_ptr< Geometry > getInput(size_t port=0) const
Returns input geometry given port, returns nullptr if doesn't exist.
void requestUpdate() override
Users can implement this for the logic to be run.
int idCount
Indicates number of vertices (if 1 a cell or individual vertex)
PickData provides ids to indicate what was picked These may be optionally used to indicate the select...
std::shared_ptr< VecDataArray< double, 3 > > getVertexPositions(DataType type=DataType::PostTransform) const
Returns the vector of current positions of the mesh vertices.
CellTypeId cellType
Indicates picked cell type.
int ids[4]
Ids of the cell or vertices.