public Ray3D TransformFromCoordSys(Ray3D r) { var p = r.ThroughPoint; var uv = r.Direction; // positionen och vektorn transformeras var point = this.BaseChangeMatrix.Invert().Transform(p) + this.OffsetToBase; var direction = this.BaseChangeMatrix.Invert().Transform(uv); return(new Ray3D(point, direction)); }
public Ray3D TransformToCoordSys(Ray3D r) { var p = r.ThroughPoint; var uv = r.Direction; // positionen och vektorn transformeras var baseChangeMatrix = this.BaseChangeMatrix; var point = baseChangeMatrix.Transform(p) + this.OffsetToBase; var direction = uv.TransformBy(baseChangeMatrix); return(new Ray3D(point, direction)); }
/// <summary> /// Transforms a ray and returns the transformed. /// </summary> /// <param name="ray"></param> /// <returns></returns> public Ray3D Transform(Ray3D ray) { return(new Ray3D(this.Transform(ray.ThroughPoint), this.Transform(ray.Direction))); }
public static Point3D ItersectionOf(Plane plane, Ray3D ray) { return(plane.IntersectionWith(ray)); }