public void Transform(ITransform3 transform) { ITransform3 oldValue = this.modelView; this.modelView = this.modelView.Concat(transform); this.OnPropertyChanged(MODEL_VIEW, oldValue, this.modelView); }
public static Matrixd ToMatrixd(this ITransform3 transform) { if (transform is Transform3Identity) { return(Matrixd.identity()); } if (transform is Transform3Matrix) { return(((Transform3Matrix)transform).Matrix.ToMatrixd()); } throw new NotSupportedException(); }
public override ITransform3 Concat(ITransform3 transform) { if (transform is Transform3Identity) { return(transform); } Transform3Matrix tmatrix = transform as Transform3Matrix; if (tmatrix == null) { throw new NotImplementedException(); } Matrix4x4d result = this.Matrix.Clone(); result.Mul(tmatrix.Matrix); return(new Transform3Matrix(result, true)); }
public abstract ITransform3 Concat(ITransform3 transform);
public override ITransform3 Concat(ITransform3 transform) { return(transform); }
public static BoundingBox3d DoTransform(this ITransform3 transform, BoundingBox3d bbox) { return(BoundingBox3d.Union(bbox.GetVertices().Select(v => transform.DoTransform(v)))); }
public static Point3d DoTransform(this ITransform3 transform, Point3d p) { return(transform.Transform(p).ToPoint3d()); }
public static Vector3d DoTransform(this ITransform3 transform, Vector3d v) { return(transform.Transform(v).ToVector3d()); }