Esempio n. 1
0
 public User(Scene scene)
 {
     _scene = scene;
     _mouseControlsCamera = true;
     _windowCenterX = (GlutManager.GetWidth(0) / 2);
     _windowCenterY = (GlutManager.GetHeight(0) / 2);
 }
Esempio n. 2
0
        int _transitionTime; //how much elapsed time between each snapshot

        #endregion Fields

        #region Constructors

        public SlotViewer(Trajectory trajectory, Scene scene)
        {
            ATOM_STACKS = (Options.GetInstance().AtomStacks);
            ATOM_SLICES = (Options.GetInstance().AtomSlices);
            _scene = scene;
            _trajectory = trajectory;
            _snapshotIndexA = 0;
            _snapshotIndexB = 1;

            Console.WriteLine();

            if (_trajectory.CountSnapshots() == 0)
                throw new Exception("No snapshots to work with!");
            else
                Console.WriteLine("Creating viewer for trajectory with {0} snapshots...", _trajectory.CountSnapshots());

            var RENDER_MODE = Options.GetInstance().RenderMode;
            if (RENDER_MODE == RenderMode.BALL_N_STICK)
            {
                AddAllAtoms();
                Console.WriteLine();
            }

            AddAllBonds();
            Console.WriteLine();

            Console.WriteLine("... done creating SlotViewer.");
        }
Esempio n. 3
0
        public Viewer()
        {
            _scene = new Scene(CreateCamera());
            User = new User(_scene);
            _timeSpentRendering = 0;
            _frameCount = 0;
            _needsRerendering = true;

            GL.Enable(EnableCap.DepthTest);
            GL.Enable(EnableCap.CullFace);
            GL.CullFace(CullFaceMode.Back);

            AddModels();
            User.GrabPointer(0, 0);
            ReportFPS();
        }