Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Stage.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: Stage.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.42 $       $Date: 2019/09/26 03:19:41 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   A Stage is a displayable object that acts as floor for other objects.
00019  * It is intended to be a point of reference.
00020  *
00021  ***************************************************************************/
00022 #ifndef STAGE_H
00023 #define STAGE_H
00024 
00025 #include "Displayable.h"
00026 #include "DispCmds.h"
00027 
00029 class Stage : public Displayable {
00030 public:
00032   enum StagePos { NO_STAGE = 0, STAGE_ORIGIN, STAGE_LOWER, STAGE_UPPER,
00033         STAGE_LEFT, STAGE_RIGHT, STAGE_BEHIND, STAGEPOS_TOTAL };
00034 
00035 private:
00036   int usecolors[2];           
00037   int Panels;                 
00038   float Size;                 
00039   float inc;                  
00040   int stagePos;               
00041   int need_update;            
00042   DispCmdColorIndex cmdColor; 
00043   DispCmdSquare cmdSquare;    
00044   int colorCat;               
00045   int movedStage;             
00046 
00048   void create_cmdlist(void);
00049 
00050 protected:
00051   virtual void do_color_changed(int);
00052 
00053 public:
00055   Stage(Displayable *);
00056 
00058   int location(int);
00059 
00061   int location(void) { return stagePos; }
00062 
00064   char *loc_description(int);
00065 
00067   int locations(void) { return STAGEPOS_TOTAL; }
00068 
00070   int panels(void) { return Panels; }
00071 
00073   int panels(int newp) {
00074     if (newp == Panels) return TRUE;
00075     if (newp >= 1 && newp <= 30) {
00076       Panels = newp;
00077       inc = (Size * 2.0f) / (float) Panels;
00078       need_update = TRUE;
00079       return TRUE; // success
00080     }
00081     return FALSE; // failed
00082   }
00083 
00084 
00086   float size(void) { return Size; }
00087 
00089   float size(float newsize) {
00090     Size = newsize;
00091     inc = (Size * 2.0f) / (float) Panels;
00092     need_update = TRUE;
00093     return TRUE; // success
00094   }
00095 
00096   //
00097   // public virtual routines
00098   //
00099   
00101   virtual void prepare();
00102 
00109   virtual void pick_move(PickMode *, DisplayDevice *, int, int, const float *);
00110 
00111 };
00112 
00113 #endif
00114 

Generated on Thu Apr 18 02:45:37 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002