Exemplo n.º 1
0
        public void Rotate(float x, float y, float z)
        {
            Point3d center = CalcCenter();
            float   cz     = center.z;

            if ((x == 0) && (y == 0))
            {
                cz = 0;
            }
            // else - i think we need to delete all supports -SHS
            Translate((float)-center.x, (float)-center.y, (float)-cz);

            Matrix3D rotmat = new Matrix3D();

            rotmat.Identity();
            rotmat.Rotate(x, y, z);
            Rotate(rotmat);
            if ((x == 0) && (y == 0))
            {
                foreach (Object3d sup in m_supports)
                {
                    sup.Rotate(rotmat);
                }
            }
            Translate((float)center.x, (float)center.y, (float)cz);
        }
Exemplo n.º 2
0
        public void Rotate(float x, float y, float z)
        {
            Point3d center = CalcCenter();

            Translate((float)-center.x, (float)-center.y, (float)-center.z);

            Matrix3D rotmat = new Matrix3D();

            rotmat.Identity();
            rotmat.Rotate(x, y, z);
            for (int c = 0; c < m_lstpoints.Count; c++)
            {
                Point3d p  = (Point3d)m_lstpoints[c];
                Point3d p1 = rotmat.Transform(p);
                p.x = p1.x;
                p.y = p1.y;
                p.z = p1.z;
            }
            Translate((float)center.x, (float)center.y, (float)center.z);
        }
Exemplo n.º 3
0
        public void Rotate(float x, float y, float z) 
        {
            Point3d center = CalcCenter();
            Translate((float)-center.x, (float)-center.y, (float)-center.z);

            Matrix3D rotmat = new Matrix3D();
            rotmat.Identity();
            rotmat.Rotate(x, y, z);
            for(int c = 0; c< m_lstpoints.Count;c++)            
            {
                Point3d p = (Point3d)m_lstpoints[c];
                Point3d p1 = rotmat.Transform(p);
                p.x = p1.x;
                p.y = p1.y;
                p.z = p1.z;
            }
            Translate((float)center.x, (float)center.y, (float)center.z);
        }
Exemplo n.º 4
0
        public void Rotate(float x, float y, float z) 
        {
            Point3d center = CalcCenter();
            float cz = center.z;
            if ((x == 0) && (y == 0))
                cz = 0;
            // else - i think we need to delete all supports -SHS
            Translate((float)-center.x, (float)-center.y, (float)-cz);

            Matrix3D rotmat = new Matrix3D();
            rotmat.Identity();
            rotmat.Rotate(x, y, z);
            Rotate(rotmat);
            if ((x == 0) && (y == 0))
            {
                foreach (Object3d sup in m_supports)
                    sup.Rotate(rotmat);
            }
            Translate((float)center.x, (float)center.y, (float)cz);
        }