Esempio n. 1
0
        protected void MoveObserverToTransformation(HomogeneousPoint3D point, IPolyhedron3D obj)
        {
            Matrix affineMatrix = AffineTransformation.MoveOriginTo(point);

            obj.Transform(affineMatrix);
            obj.TransformRotationCenter(affineMatrix);
        }
        private void MovePolyhedronTo(HomogeneousPoint3D currentCenter,
                                      HomogeneousPoint3D needCenter, IPolyhedron3D polyhedron)
        {
            var originPoint = new HomogeneousPoint3D(
                currentCenter.X - needCenter.X,
                currentCenter.Y - needCenter.Y,
                currentCenter.Z - needCenter.Z,
                needCenter.W);
            Matrix affineMatrix = AffineTransformation.MoveOriginTo(originPoint);

            polyhedron.Transform(affineMatrix);
            polyhedron.TransformRotationCenter(affineMatrix);
        }