Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/math_intersect.h
| Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | if (ellipse && (u * u + v * v > 0.25f)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* Store the result. */ | /* Store the result. */ | ||||
| /* TODO(sergey): Check whether we can avoid some checks here. */ | /* TODO(sergey): Check whether we can avoid some checks here. */ | ||||
| if (isect_P != NULL) | if (isect_P != NULL) | ||||
| *isect_P = hit; | *isect_P = hit; | ||||
| if (isect_t != NULL) | if (isect_t != NULL) | ||||
| *isect_t = t; | *isect_t = t; | ||||
| /* NOTE: Return barycentric coordinates in the same notation as Embree and OptiX. */ | |||||
| if (isect_u != NULL) | if (isect_u != NULL) | ||||
| *isect_u = u + 0.5f; | *isect_u = v + 0.5f; | ||||
| if (isect_v != NULL) | if (isect_v != NULL) | ||||
| *isect_v = v + 0.5f; | *isect_v = -u - v; | ||||
| return true; | return true; | ||||
| } | } | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||
| #endif /* __UTIL_MATH_INTERSECT_H__ */ | #endif /* __UTIL_MATH_INTERSECT_H__ */ | ||||