Example #1
0
        public void Transform(ITransform3 transform)
        {
            ITransform3 oldValue = this.modelView;

            this.modelView = this.modelView.Concat(transform);
            this.OnPropertyChanged(MODEL_VIEW, oldValue, this.modelView);
        }
Example #2
0
 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();
 }
Example #3
0
        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));
        }
Example #4
0
 public abstract ITransform3 Concat(ITransform3 transform);
Example #5
0
 public override ITransform3 Concat(ITransform3 transform)
 {
     return(transform);
 }
Example #6
0
 public static BoundingBox3d DoTransform(this ITransform3 transform, BoundingBox3d bbox)
 {
     return(BoundingBox3d.Union(bbox.GetVertices().Select(v => transform.DoTransform(v))));
 }
Example #7
0
 public static Point3d DoTransform(this ITransform3 transform, Point3d p)
 {
     return(transform.Transform(p).ToPoint3d());
 }
Example #8
0
 public static Vector3d DoTransform(this ITransform3 transform, Vector3d v)
 {
     return(transform.Transform(v).ToVector3d());
 }