Back to class index
| Ray::DistanceSyntaxfloat Ray::Distance(const float3 &point, float *d) const; [4 lines of code]float Ray::Distance(const float3 &point) const; [4 lines of code] float Ray::Distance(const Ray &other, float *d, float *d2=0) const; [7 lines of code] float Ray::Distance(const Ray &other) const; [4 lines of code] float Ray::Distance(const Line &other, float *d, float *d2=0) const; [7 lines of code] float Ray::Distance(const Line &other) const; [4 lines of code] float Ray::Distance(const LineSegment &other, float *d, float *d2=0) const; [7 lines of code] float Ray::Distance(const LineSegment &other) const; [4 lines of code] float Ray::Distance(const Sphere &sphere) const; [4 lines of code] float Ray::Distance(const Capsule &capsule) const; [4 lines of code] Computes the distance between this ray and the given object. This function finds the nearest pair of points on this and the given object, and computes their distance. If the two objects intersect, or one object is contained inside the other, the returned distance is zero. Parametersfloat *d [out]If specified, receives the parametric distance along this ray that specifies the closest point on this ray to the given object. The value returned here can be negative. This pointer may be null.float *d2 [out]If specified, receives the parametric distance along the other line that specifies the closest point on that line to this ray. The value returned here can be negative. This pointer may be null. Performancefloat Ray::Distance(const float3 &point, float *d) const24.632nsecs/call ≈ 40.6M calls/second ≈ 676.64k calls/frame (@ 60fps). 24.632nsecs/call ≈ 40.6M calls/second ≈ 676.64k calls/frame (@ 60fps). 0.074μsecs/call ≈ 13.53M calls/second ≈ 225.55k calls/frame (@ 60fps). 0.078μsecs/call ≈ 12.82M calls/second ≈ 213.68k calls/frame (@ 60fps). 0.074μsecs/call ≈ 13.53M calls/second ≈ 225.55k calls/frame (@ 60fps). 0.078μsecs/call ≈ 12.82M calls/second ≈ 213.68k calls/frame (@ 60fps). 0.074μsecs/call ≈ 13.53M calls/second ≈ 225.55k calls/frame (@ 60fps). 0.078μsecs/call ≈ 12.82M calls/second ≈ 213.68k calls/frame (@ 60fps). 28.737nsecs/call ≈ 34.8M calls/second ≈ 579.98k calls/frame (@ 60fps). 0.086μsecs/call ≈ 11.6M calls/second ≈ 193.33k calls/frame (@ 60fps). See AlsoLeave a Comment |