Example #1
0
        public void AddRot(Quat q)
        {
            this.v1 *= q;
            this.v2 *= q;
            this.v3 *= q;

            this.n1 *= q;
            this.n2 *= q;
            this.n3 *= q;
        }
Example #2
0
        /// <summary>
        /// Rotates the mesh
        /// </summary>
        /// <param name="q"></param>
        public void AddRot(Quat q)
        {
            if (q.X == 0 && q.Y == 0 && q.Z == 0 && q.W == 1) return;

            int i;
            int numVerts = this.coords.Count;

            for (i = 0; i < numVerts; i++)
                this.coords[i] *= q;

            int numNormals = this.normals.Count;
            for (i = 0; i < numNormals; i++)
                this.normals[i] *= q;

            if (this.viewerFaces != null)
            {
                int numViewerFaces = this.viewerFaces.Count;

                for (i = 0; i < numViewerFaces; i++)
                {
                    ViewerFace v = this.viewerFaces[i];
                    v.v1 *= q;
                    v.v2 *= q;
                    v.v3 *= q;

                    v.n1 *= q;
                    v.n2 *= q;
                    v.n3 *= q;

                    this.viewerFaces[i] = v;
                }
            }
        }
Example #3
0
        internal void AddRot(Quat q)
        {
            int i;
            int numVerts = this.coords.Count;

            for (i = 0; i < numVerts; i++)
                this.coords[i] *= q;

            if (this.calcVertexNormals)
            {
                int numNormals = this.vertexNormals.Count;
                for (i = 0; i < numNormals; i++)
                    this.vertexNormals[i] *= q;

                this.faceNormal *= q;
                this.cutNormal1 *= q;
                this.cutNormal2 *= q;

            }
        }