25 #ifndef HBRCREASEEDIT_H
26 #define HBRCREASEEDIT_H
28 #include "../version.h"
30 namespace OpenSubdiv {
31 namespace OPENSUBDIV_VERSION {
36 std::ostream& operator<<(std::ostream& out, const HbrCreaseEdit<T>& path) {
37 out <<
"edge 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.edgeid) <<
"), sharpness = " << path.sharpness;
50 :
HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), edgeid(_edgeid), op(_op), sharpness(_sharpness) {
54 :
HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), edgeid(static_cast<unsigned char>(_edgeid)), op(_op), sharpness(_sharpness) {
59 friend std::ostream& operator<< <T> (std::ostream& out,
const HbrCreaseEdit<T>& path);
68 sharp = face->
GetEdge(edgeid)->GetSharpness() + sharpness;
70 sharp = face->
GetEdge(edgeid)->GetSharpness() - sharpness;
80 face->
GetEdge(edgeid)->GuaranteeNeighbor();
81 face->
GetEdge(edgeid)->SetSharpness(sharp);
88 const unsigned char edgeid;
91 const float sharpness;
96 using namespace OPENSUBDIV_VERSION;
HbrHalfedge< T > * GetEdge(int index) const
HbrCreaseEdit(int _faceid, int _nsubfaces, unsigned char *_subfaces, unsigned char _edgeid, typename HbrHierarchicalEdit< T >::Operation _op, float _sharpness)
HbrCreaseEdit(int _faceid, int _nsubfaces, int *_subfaces, int _edgeid, typename HbrHierarchicalEdit< T >::Operation _op, float _sharpness)
virtual void ApplyEditToFace(HbrFace< T > *face)