public void TransformInto(Trafo2d trafo, ref Hull2d hull) { int count = PlaneCount; var invTr = trafo.Backward.Transposed; for (int i = 0; i < count; i++) { hull.PlaneArray[i] = new Plane2d( invTr.TransformDir(PlaneArray[i].Normal).Normalized, trafo.Forward.TransformPos(PlaneArray[i].Point)); } }
public Hull2d Transformed(Trafo2d trafo) { int count = PlaneCount; var hull = new Hull2d(new Plane2d[count]); var invTr = trafo.Backward.Transposed; for (int i = 0; i < count; i++) { hull.PlaneArray[i] = new Plane2d( invTr.TransformDir(PlaneArray[i].Normal).Normalized, trafo.Forward.TransformPos(PlaneArray[i].Point)); } return(hull); }
/// <summary> /// Creates a rigid transformation from a trafo <paramref name="trafo"/>. /// </summary> public Euclidean2f(Trafo2d trafo) { Rot = Rot2f.FromM22f((M22f)trafo.Forward); Trans = (V2f)trafo.Forward.C2.XY; }
/// <summary> /// Creates a rigid transformation from a trafo <paramref name="trafo"/>. /// </summary> public Euclidean2d(Trafo2d trafo) { Rot = Rot2d.FromM22d((M22d)trafo.Forward); Trans = (V2d)trafo.Forward.C2.XY; }
public Trafo2d(Trafo2d trafo) { Forward = trafo.Forward; Backward = trafo.Backward; }
/// <summary> /// Creates a rigid transformation from a trafo <paramref name="trafo"/>. /// </summary> public __e2t__(Trafo2d trafo) { Rot = __r2t__.FromM2__s2f__((M2__s2f__)trafo.Forward); Trans = (__v2t__)trafo.Forward.C2.XY; }