mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-24 12:30:17 +00:00
fix FarPatchTables::IsFeatureAdaptive() :
- trivial return if Gregory specific patch data is set - or iterate through the patch-arrays until an adaptive patch is found (REGULAR,...,GREGORY_BOUNDARY) fixes #173
This commit is contained in:
parent
419b6b9716
commit
7cb2463dc7
@ -531,7 +531,23 @@ FarPatchTables::FarPatchTables(PatchArrayVector const & patchArrays,
|
||||
|
||||
inline bool
|
||||
FarPatchTables::IsFeatureAdaptive() const {
|
||||
return ((not _vertexValenceTable.empty()) and (not _quadOffsetTable.empty()));
|
||||
|
||||
// the vertex valence table is only used by Gregory patches, so the PatchTables
|
||||
// contain feature adaptive patches if this is not empty.
|
||||
if (not _vertexValenceTable.empty())
|
||||
return true;
|
||||
|
||||
PatchArrayVector const & parrays = GetPatchArrayVector();
|
||||
|
||||
// otherwise, we have to check each patch array
|
||||
for (int i=0; i<(int)parrays.size(); ++i) {
|
||||
|
||||
if (parrays[i].GetDescriptor().GetType() >= REGULAR and
|
||||
parrays[i].GetDescriptor().GetType() <= GREGORY_BOUNDARY)
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns the number of control vertices expected for a patch of this type
|
||||
|
Loading…
Reference in New Issue
Block a user