mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-27 14:00:10 +00:00
Fixed double to float conversion warnings
This commit is contained in:
parent
15ee687aca
commit
287441118e
@ -489,8 +489,8 @@ Scheme<SCHEME_LOOP>::assignCreaseLimitTangentMasks(VERTEX const& vertex,
|
|||||||
|
|
||||||
double theta = M_PI / (interiorEdgeCount + 1);
|
double theta = M_PI / (interiorEdgeCount + 1);
|
||||||
|
|
||||||
Weight cWeight = -3.0f * std::sin(theta);
|
Weight cWeight = -3.0f * (Weight) std::sin(theta);
|
||||||
Weight eWeightCoeff = -3.0f * (2.0f * std::cos(theta) - 2.0f);
|
Weight eWeightCoeff = -3.0f * (2.0f * (Weight) std::cos(theta) - 2.0f);
|
||||||
|
|
||||||
tan2Mask.VertexWeight(0) = 0.0f;
|
tan2Mask.VertexWeight(0) = 0.0f;
|
||||||
|
|
||||||
@ -498,7 +498,7 @@ Scheme<SCHEME_LOOP>::assignCreaseLimitTangentMasks(VERTEX const& vertex,
|
|||||||
tan2Mask.EdgeWeight(creaseEnds[1]) = cWeight;
|
tan2Mask.EdgeWeight(creaseEnds[1]) = cWeight;
|
||||||
|
|
||||||
for (int i = 1; i <= interiorEdgeCount; ++i) {
|
for (int i = 1; i <= interiorEdgeCount; ++i) {
|
||||||
tan2Mask.EdgeWeight(creaseEnds[0] + i) = eWeightCoeff * std::sin(i * theta);
|
tan2Mask.EdgeWeight(creaseEnds[0] + i) = eWeightCoeff * (Weight) std::sin(i * theta);
|
||||||
}
|
}
|
||||||
} else if (interiorEdgeCount == 1) {
|
} else if (interiorEdgeCount == 1) {
|
||||||
// See notes above regarding scale factor of 3.0:
|
// See notes above regarding scale factor of 3.0:
|
||||||
@ -566,8 +566,8 @@ Scheme<SCHEME_LOOP>::assignSmoothLimitTangentMasks(VERTEX const& vertex,
|
|||||||
Weight alpha = (Weight) (2.0f * M_PI / valence);
|
Weight alpha = (Weight) (2.0f * M_PI / valence);
|
||||||
for (int i = 0; i < valence; ++i) {
|
for (int i = 0; i < valence; ++i) {
|
||||||
double alphaI = alpha * i;
|
double alphaI = alpha * i;
|
||||||
tan1Mask.EdgeWeight(i) = std::cos(alphaI);
|
tan1Mask.EdgeWeight(i) = (Weight) std::cos(alphaI);
|
||||||
tan2Mask.EdgeWeight(i) = std::sin(alphaI);
|
tan2Mask.EdgeWeight(i) = (Weight) std::sin(alphaI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user