24 #ifndef VTR_SPARSE_SELECTOR_H
25 #define VTR_SPARSE_SELECTOR_H
27 #include "../version.h"
29 #include "../vtr/types.h"
30 #include "../vtr/refinement.h"
34 namespace OpenSubdiv {
35 namespace OPENSUBDIV_VERSION {
99 return _prevRefine && _prevRefine->_childVertexTag[pVertex]._incomplete;
105 bool wasVertexSelected(
Index pVertex)
const {
return _refine->_parentVertexTag[pVertex]._selected; }
106 bool wasEdgeSelected(
Index pEdge)
const {
return _refine->_parentEdgeTag[pEdge]._selected; }
107 bool wasFaceSelected(
Index pFace)
const {
return _refine->_parentFaceTag[pFace]._selected; }
109 void markVertexSelected(
Index pVertex)
const { _refine->_parentVertexTag[pVertex]._selected =
true; }
110 void markEdgeSelected(
Index pEdge)
const { _refine->_parentEdgeTag[pEdge]._selected =
true; }
111 void markFaceSelected(
Index pFace)
const { _refine->_parentFaceTag[pFace]._selected =
true; }
113 void markSelection();
117 Refinement
const* _prevRefine;
124 using namespace OPENSUBDIV_VERSION;
Refinement const * getPreviousRefinement() const
void selectVertex(Index pVertex)
SparseSelector(Refinement &refine)
void selectVertexFaces(Index pVertex)
bool isVertexIncomplete(Index pVertex) const
bool isSelectionEmpty() const
void selectFace(Index pFace)
void selectEdge(Index pEdge)
Refinement & getRefinement() const
void setRefinement(Refinement &refine)
void setPreviousRefinement(Refinement const *refine)