Ejemplo n.º 1
0
        public void CreateRotation(_TransformOrientation orient, float valueDegrees)
        {
            float rValue = MathHelper.ToRadians(valueDegrees);

            if (orient == _TransformOrientation.X)
            {
                this.world *= Matrix.CreateRotationX(rValue);
            }

            else if (orient == _TransformOrientation.Y)
            {
                this.world *= Matrix.CreateRotationY(rValue);
            }

            else if (orient == _TransformOrientation.Z)
            {
                this.world *= Matrix.CreateRotationZ(rValue);
            }

            foreach (_Quad w in sides)
            {
                w.SetMatrix(this.world);
            }
            foreach (_Quad w in backHelixSides)
            {
                w.SetMatrix(this.world);
            }
            foreach (_Quad w in topHelixSides)
            {
                w.SetMatrix(this.world);
            }
        }
Ejemplo n.º 2
0
        public void CreateRotation(_TransformOrientation orient, float valueDegrees)
        {
            float rValue = MathHelper.ToRadians(valueDegrees);

            if (orient == _TransformOrientation.X)
            {
                this.world *= Matrix.CreateRotationX(rValue);
            }

            else if (orient == _TransformOrientation.Y)
            {
                this.world *= Matrix.CreateRotationY(rValue);
            }

            else if (orient == _TransformOrientation.Z)
            {
                this.world *= Matrix.CreateRotationZ(rValue);
            }
        }