Back to class index
| Ray::GetPointSyntaxfloat3 Ray::GetPoint(float distance) const; [5 lines of code]Gets a point along the ray at the given distance. Use this function to convert a 1D parametric point along the Ray to a 3D point in the linear space. ParametersfloatdistanceThe point to compute. GetPoint(0) will return pos. GetPoint(t) will return a point at distance |t| from pos. Passing in negative values is allowed, but in that case, the returned point does not actually lie on this Ray. Return Valuepos + distance * dir. Performance4.105nsecs/call ≈ 243.59M calls/second ≈ 4.06M calls/frame (@ 60fps). See AlsoLeave a Comment |