Example #1
0
        public override void Draw()
        {
            Gl.glPushMatrix();
            Gl.glTranslated(this.Position.X, this.Position.Y, this.Position.Z);
            Gl.glRotated(this.Angle.X, 1, 0, 0);
            Gl.glRotated(this.Angle.Y, 0, 1, 0);
            Gl.glRotated(this.Angle.Z, 0, 0, 1);

            DrawingService.PickTexture(TextureNames.Metal);
            DrawingService.GenerateTexture();
            Glut.glutSolidSphere(0.25 * this.Size, 48, 48);
            Gl.glPopMatrix();
            DrawingService.DeactivateGeneration();

            foreach (var obj in this.FixtureObjects)
            {
                //obj.Position += this.Position;
                //Point3d n = new Point3d(0, 0, 0);
                //bool flag = obj.Position.Equals(n);
                //if (flag)
                //    obj.Position += this.Position;

                obj.Draw();

                //if (flag)
                //    obj.Position -= this.Position;
                //obj.Position -= this.Position;
            }
        }