25 #ifndef HBRCORNEREDIT_H
26 #define HBRCORNEREDIT_H
28 #include "../version.h"
30 namespace OpenSubdiv {
31 namespace OPENSUBDIV_VERSION {
36 std::ostream& operator<<(std::ostream& out, const HbrCornerEdit<T>& path) {
37 out <<
"vertex path = (" << path.
faceid <<
' ';
38 for (
int i = 0; i < path.nsubfaces; ++i) {
39 out << static_cast<int>(path.subfaces[i]) <<
' ';
41 return out << static_cast<int>(path.vertexid) <<
"), sharpness = " << path.sharpness;
50 :
HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), vertexid(_vertexid), op(_op), sharpness(_sharpness) {
54 :
HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), vertexid(static_cast<unsigned char>(_vertexid)), op(_op), sharpness(_sharpness) {
59 friend std::ostream& operator<< <T> (std::ostream& out,
const HbrCornerEdit<T>& path);
69 sharp = face->
GetVertex(vertexid)->GetSharpness() + sharpness;
71 sharp = face->
GetVertex(vertexid)->GetSharpness() - sharpness;
79 face->
GetVertex(vertexid)->SetSharpness(sharp);
86 const unsigned char vertexid;
89 const float sharpness;
94 using namespace OPENSUBDIV_VERSION;
virtual void ApplyEditToFace(HbrFace< T > *face)
HbrCornerEdit(int _faceid, int _nsubfaces, unsigned char *_subfaces, unsigned char _vertexid, typename HbrHierarchicalEdit< T >::Operation _op, float _sharpness)
HbrCornerEdit(int _faceid, int _nsubfaces, int *_subfaces, int _vertexid, typename HbrHierarchicalEdit< T >::Operation _op, float _sharpness)
HbrVertex< T > * GetVertex(int index) const