mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-03 05:31:12 +00:00
Added the ApplyOperatorAllEdges
method to HbrFace
, which applies a HbrHalfedgeOperator
to each halfedge of the face.
This commit is contained in:
parent
1d1d44c881
commit
0b3e99df09
@ -46,6 +46,7 @@ namespace OPENSUBDIV_VERSION {
|
||||
|
||||
template <class T> class HbrVertex;
|
||||
template <class T> class HbrHalfedge;
|
||||
template <class T> class HbrHalfedgeOperator;
|
||||
template <class T> class HbrFace;
|
||||
template <class T> class HbrMesh;
|
||||
template <class T> class HbrHierarchicalEdit;
|
||||
@ -145,6 +146,9 @@ public:
|
||||
// indicated origin index
|
||||
HbrHalfedge<T>* GetEdge(int index) const;
|
||||
|
||||
// Applies operator to all halfedges
|
||||
void ApplyOperatorAllEdges(HbrHalfedgeOperator<T>& op) const;
|
||||
|
||||
// Return the vertex with the indicated index
|
||||
HbrVertex<T>* GetVertex(int index) const;
|
||||
|
||||
@ -725,6 +729,16 @@ HbrFace<T>::GetEdge(int index) const {
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void
|
||||
HbrFace<T>::ApplyOperatorAllEdges(HbrHalfedgeOperator<T> &op) const {
|
||||
HbrHalfedge<T>* edge = GetFirstEdge();
|
||||
for (int i = 0; i < nvertices; ++i) {
|
||||
op(*edge);
|
||||
edge = edge->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
HbrVertex<T>*
|
||||
HbrFace<T>::GetVertex(int index) const {
|
||||
|
Loading…
Reference in New Issue
Block a user