mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-10 06:10:07 +00:00
Fixed a compiler error in tbbKernel.cpp. Addressed comments from https://github.com/PixarAnimationStudios/OpenSubdiv/pull/310.
This commit is contained in:
parent
e28215446a
commit
94c2a4293c
@ -236,7 +236,7 @@ FarCatmarkSubdivisionTablesFactory<T,U>::Create( FarMeshFactory<T,U> * meshFacto
|
||||
|
||||
if (kernelType == FarKernelBatch::CATMARK_RESTRICTED_EDGE_VERTEX) {
|
||||
// in the case of a sharp edge, repeat the endpoint vertices
|
||||
if (!e->IsBoundary() && esharp == 0.0f) {
|
||||
if (!e->IsBoundary() && esharp == HbrHalfedge<T>::k_Smooth) {
|
||||
HbrFace<T>* rf = e->GetRightFace();
|
||||
HbrFace<T>* lf = e->GetLeftFace();
|
||||
|
||||
@ -246,7 +246,7 @@ FarCatmarkSubdivisionTablesFactory<T,U>::Create( FarMeshFactory<T,U> * meshFacto
|
||||
E_IT[4*i+2] = E_IT[4*i+0];
|
||||
E_IT[4*i+3] = E_IT[4*i+1];
|
||||
}
|
||||
} else if (!e->IsBoundary() && esharp <= 1.0f) {
|
||||
} else if (!e->IsBoundary() && esharp <= HbrHalfedge<T>::k_Sharp) {
|
||||
// in the case of a fractional sharpness, set the adjacent faces vertices
|
||||
|
||||
float leftWeight, rightWeight;
|
||||
|
@ -210,7 +210,7 @@ FarSubdivisionTablesFactory<T,U>::FarSubdivisionTablesFactory( HbrMesh<T> const
|
||||
|
||||
// Determine if any edges have fractional sharpness.
|
||||
float sharpness = v->GetParentEdge()->GetSharpness();
|
||||
if (sharpness > 0.0f && sharpness < 1.0f)
|
||||
if (sharpness > HbrHalfedge<T>::k_Smooth && sharpness < HbrHalfedge<T>::k_Sharp)
|
||||
_hasFractionalEdgeSharpness = true;
|
||||
} else if (v->GetParentVertex()) {
|
||||
vertCounts[depth]++;
|
||||
|
@ -455,8 +455,8 @@ void OsdTbbComputeRestrictedEdge(
|
||||
int const *E_IT, int vertexOffset, int tableOffset,
|
||||
int start, int end) {
|
||||
tbb::blocked_range<int> range(start, end, grain_size);
|
||||
TBBEdgeKernel kernel(vertex, varying, vertexDesc, varyingDesc, E_IT,
|
||||
vertexOffset, tableOffset);
|
||||
TBBRestrictedEdgeKernel kernel(vertex, varying, vertexDesc, varyingDesc, E_IT,
|
||||
vertexOffset, tableOffset);
|
||||
tbb::parallel_for(range, kernel);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user